/* Reference B supplies the desktop geometry/materials; A supplies mobile/theater.
   All controls and video remain live DOM above decorative image surfaces. */
@font-face{font-family:WorkmanHand;src:url('/tools/voice-book/fonts/Gaegu-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
.rack-label h1{font-family:WorkmanHand,cursive!important;font-weight:400!important}
.rack-label i,.stage-top>i,.device-brand i,.blank-tape i{font-family:WorkmanHand,cursive!important}
.desk{padding:16px 28px 34px;min-height:800px;background:#16100a url('./assets/listening-room-v2.webp') center center/cover no-repeat;isolation:isolate}
.desk:before{inset:0;border:0;background:linear-gradient(90deg,#08070538,transparent 45%),linear-gradient(0deg,#0b0a0980,transparent 30%);box-shadow:none}
.preview-label{max-width:1460px;margin:0 auto 18px;font-size:9px;color:#f4d489;text-shadow:0 2px 4px #000}
.preview-label span{color:#ead8b1}
.studio{max-width:1460px;grid-template-columns:minmax(320px,35.5fr) minmax(0,64.5fr);gap:18px;align-items:start}
.rack{border:0;border-radius:0;padding:58px 40px 67px;background:none;box-shadow:none;isolation:isolate;min-height:690px}
.rack:before{inset:-10px -16px -15px;height:auto;background:url('./assets/acrylic-rack-v2.webp') center/100% 100% no-repeat;z-index:-1;filter:drop-shadow(6px 12px 9px #0009)}
.rack:after{inset:6.8% 9% 7.2%;height:auto;background:linear-gradient(100deg,#19130cd9,#25190fe8);z-index:-2;box-shadow:inset 0 0 60px #9e541a24}
.rack-label{position:relative;padding:14px 12px 12px;border:1px solid #a16a32;border-radius:3px;gap:8px;transform:rotate(-1deg);background:repeating-linear-gradient(0deg,transparent 0 21px,#9c633b1a 22px 23px),linear-gradient(120deg,#bd8e59,#f9d9b5 14%,#efd1b0 58%,#c49a70);box-shadow:0 3px 6px #000b,inset 0 0 0 3px #f6dfb878,0 0 0 4px #1c150b,0 0 0 5px #b48444}
.rack-label:before,.rack-label:after{content:'';position:absolute;width:45px;height:16px;background:#b88b4d7d;box-shadow:0 1px 2px #24150733;top:-5px;left:-8px;transform:rotate(-40deg)}
.rack-label:after{left:auto;right:-8px;top:auto;bottom:-4px}
.rack-label strong{font-size:clamp(12px,1.16vw,17px);font-weight:800;letter-spacing:-.045em}
.rack-label h1{font-family:'Segoe Print','Malgun Gothic',cursive;font-size:clamp(25px,2.7vw,39px);font-weight:600;margin:5px 0 3px;line-height:1.25}
.rack-label i{font-size:11px;color:#422710}.note-symbol{font-size:27px}
.rack-actions{margin:18px 0 12px}.rack-actions button{min-height:40px;font-size:13px;border-radius:8px}.rack-actions>span{background:#b69b7e22;min-height:40px;display:grid;place-items:center;border:1px solid #9b714443;border-radius:7px}
.search{border-color:#b38c585c;background:#110e0bc9;box-shadow:inset 0 2px 5px #0007}.search input{font-size:12px;padding:9px 0}
.list-options{margin:5px 0 6px}.list-options button{color:#d7c8b1}.songs{gap:8px;padding:4px 3px 14px;max-height:424px}
.cassette{border-radius:4px;min-height:59px;border:1px solid #c89b65;background:repeating-linear-gradient(0deg,transparent 0 18px,#73472212 19px 20px),linear-gradient(95deg,#976338,#e8c6a3 7%,#f6dbc0 35%,#e7c8ac 83%,#ae7e53);box-shadow:0 0 0 2px #0d0b09,0 0 0 3px #ab6e3077,0 4px 3px #000b,inset 0 0 0 3px #dfb17e70,inset 0 2px #fff0d8a8}
.cassette:before,.cassette:after{width:3px;height:3px;background:#38220c;left:4px;box-shadow:0 0 0 1px #e4ba83}
.song-pick{gap:8px;padding:7px 4px}.track-number{min-width:17px;font-size:10px}.track-copy{gap:3px}.track-copy strong{font-size:12px}.track-copy small{font-size:10px}
.mini-tape{width:47px;height:32px;position:relative;border:2px solid #523920;border-radius:4px;gap:9px;background:linear-gradient(175deg,#eed6af 0 27%,#aa8159 28% 38%,#34291f 39% 65%,#e5c69c 66% 100%);box-shadow:0 1px 3px #0006,inset 0 0 0 1px #ffeccc9c}
.mini-tape:after{content:'';position:absolute;bottom:1px;width:23px;height:5px;border:1px solid #765c3a;border-bottom:0;transform:perspective(15px) rotateX(18deg);background:#8e73474d}
.mini-tape i{width:9px;height:9px;background:#ddc7a3;border:2px dashed #302b25;box-shadow:0 0 0 1px #d5bf9c}
.cassette.selected{background:linear-gradient(100deg,#9f7918,#18190f 17%,#070d0d 86%,#5e470f);box-shadow:0 0 0 1px #ffe25c,0 0 12px #edb62880,inset 0 0 0 3px #584721,inset 0 1px #ffeb9d}
.cassette.selected .track-copy strong{color:#ffe043}.cassette .heart{font-size:23px;padding:3px 5px}.song-menu summary{padding:6px;font-size:20px}.song-menu>div{z-index:20}
.backup-tools{padding-top:10px;margin-top:7px}.backup-tools button{min-height:34px;font-size:10px;background:#110f0bd9}.storage-note{font-size:10px;line-height:1.6;color:#d1c0a5}
.stage{padding-top:2px}.stage-top{margin:0 10px 0 0;min-height:44px;gap:12px}.stage-top>i{font-size:17px;color:#ffe1a5;text-shadow:0 2px 5px #000}
.view-switch{background:#100e0cdb;box-shadow:0 2px 7px #0009;border:1px solid #b58d3f;padding:3px}.view-switch button{font-size:10px;min-height:30px}
.device{container-type:inline-size;position:relative;border:0;border-radius:0;background:url('./assets/gold-chassis-v2.webp') center/100% 100% no-repeat;box-shadow:none;padding:15% 8.2% 8% 6.5%;filter:drop-shadow(9px 15px 8px #0008)}
.device>.knobs,.device>.screw{display:none}
.device-brand{position:absolute;left:7%;right:9%;top:12%;margin:0;gap:12px;color:#171309;text-shadow:0 1px #ffe4a799}
.device-brand strong{font-size:clamp(12px,1.35vw,20px);font-weight:800;letter-spacing:-.035em}.device-brand b{width:30px;height:32px;font-size:28px;box-shadow:inset 0 1px #fff0ad,0 1px 3px #7150198a;background:#ffce34}.device-brand i{font:italic 14px Georgia,serif;white-space:nowrap}
.bezel{border:0;border-radius:13px;background:linear-gradient(110deg,#101412,#0b0e0d 60%,#14130e);padding:7px 8px 10px;box-shadow:0 0 0 1px #1e160b,0 0 0 3px #b67a2a55,inset 0 1px #6d624144}
.screen,.screen:has(iframe){height:clamp(230px,23.2vw,370px);min-height:200px;aspect-ratio:auto;border:1px solid #72562d;border-radius:9px}
.screen #video:has(iframe){height:100%}#video iframe{height:100%;min-height:200px;width:100%}
.screen-empty{height:100%;min-height:0;background:radial-gradient(ellipse at 70% 0,#c27a1738,transparent 55%),linear-gradient(130deg,#0d100e,#181910);padding:20px 14px}
.screen-empty h2{font-size:15px;margin-top:20px}.screen-empty p{font-size:11px}.big-tape{width:210px;padding:9px 17px 16px;border-color:#a97a30;background:linear-gradient(125deg,#daa75c7a,#1c181054 30%,#a2632759 98%);box-shadow:inset 0 0 0 3px #bd8b4a38,0 16px 24px #000a}.big-tape>span{margin-bottom:12px}.big-tape .tape-reels b{width:41px;height:41px;border-width:6px}
.now{padding:10px 5px 3px;gap:10px}.now>div{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.now .eyebrow{display:none}.now h2{font-size:14px;line-height:1.35;margin:0}.now p{font-size:10px}.now .heart{font-size:23px;min-height:30px}
.timeline{padding:0 5px;gap:13px}.timeline input{min-height:22px;height:22px}.timeline output{font-size:9px}
.transport{padding:9px 10px 2px;gap:10px;min-height:72px;margin-top:3px;border-top:1px solid #c2a26229;background:linear-gradient(#211d15aa,#070b0980);border-radius:7px;box-shadow:inset 0 1px #ffffff05}
.transport>button{display:grid;place-items:center;min-height:42px;min-width:42px;border:0;background:none;box-shadow:none;padding:10px;color:#e9e5d8}
.transport svg{display:block;width:24px;height:24px}.transport>button.play{width:65px;height:65px;min-width:65px;min-height:65px;border:2px solid #ffe176;background:radial-gradient(circle at 35% 25%,#4f4530,#0d100c 72%);box-shadow:0 0 0 3px #704919,0 0 0 5px #1d1a10,0 0 20px #faca3680,inset 0 1px 4px #fff0c66b}.play svg{width:26px;height:26px}
.volume{width:90px;font-size:16px}.volume input{width:65px}.player-foot{padding:10px 8px 0;font-size:10px;color:#f2dfba;text-shadow:0 2px 3px #000}.privacy{font-size:10px;color:#decbb0;line-height:1.6;margin:10px 8px;padding:9px 12px;border-radius:8px;background:#0f100db3;max-width:none}
#notice{margin-top:14px;background:#0c0d0abf;border-radius:7px;padding:0 12px;font-size:11px}#notice:empty{min-height:0;padding:0}
.empty{padding:25px 7px}.blank-tape{background:linear-gradient(135deg,#d09f4f59,#14120cc9 40%,#c27d2c35);border:2px solid #b27a31;box-shadow:0 0 0 4px #080d0b,inset 0 0 0 3px #efb95b33}.blank-tape i{font-size:20px;color:#e9bb6f}
.desk[data-view=theater] .studio{grid-template-columns:minmax(285px,27fr) minmax(0,73fr);gap:24px}.desk[data-view=theater] .rack{padding:35px 24px 38px}.desk[data-view=theater] .stage{padding-top:16px}.desk[data-view=theater] .device{background:#0c100e;padding:7px;border-radius:14px;border:1px solid #b2863b;filter:none;box-shadow:0 15px 40px #000a}.desk[data-view=theater] .screen,.desk[data-view=theater] .screen:has(iframe){height:auto;aspect-ratio:16/9!important;min-height:240px}.desk[data-view=theater] .screen-empty{min-height:350px}.desk[data-view=theater] .stage-top{margin-bottom:12px}.desk[data-view=theater] .transport{margin:5px 8px 0;padding-bottom:8px}.desk[data-view=theater] .rack-label strong{font-size:13px}.desk[data-view=theater] .note-symbol{font-size:21px}
@media(min-width:1650px){.desk{padding-top:25px}.studio{gap:30px}.rack{min-height:730px}.songs{max-height:480px}.screen,.screen:has(iframe){height:370px}.device-brand strong{font-size:22px}}
@media(max-width:1100px) and (min-width:1001px){.desk{padding:14px 15px 26px}.studio{grid-template-columns:minmax(285px,37fr) minmax(0,63fr);gap:8px}.rack{padding:36px 23px}.rack-label strong{font-size:12px}.rack-label h1{font-size:26px}.rack-label i{font-size:9px}.note-symbol{font-size:22px}.device-brand i{display:none}.device-brand strong{font-size:13px}.device-brand b{width:23px;height:26px;font-size:22px}.screen,.screen:has(iframe){height:225px}.device{padding-top:19%;padding-bottom:9%}.device-brand{top:12%}.stage-top>i{display:none}.stage-top{justify-content:flex-end}.track-copy strong{font-size:11px}.mini-tape{width:34px}.song-pick{gap:6px}.transport{padding-left:1px;padding-right:1px;gap:2px}.transport>button.play{width:55px;height:55px;min-width:55px;min-height:55px}.transport>button{min-width:35px;padding:7px}.desk[data-view=theater] .studio{grid-template-columns:285px minmax(0,1fr);gap:12px}.desk[data-view=theater] .screen-empty{min-height:240px}}
@media(max-width:1000px){.desk{padding:14px 10px 26px;background-position:center top;background-size:auto 1050px;background-repeat:no-repeat;min-height:900px}.preview-label{font-size:8px;margin-bottom:12px;gap:6px}.preview-label span{font-size:8px}.studio,.desk[data-view=theater] .studio{display:flex;gap:18px}.stage{display:contents}.stage-top{order:1;margin:0;min-height:38px;justify-content:center}.view-switch button{font-size:11px;min-height:38px}.device{order:2;padding:28% 8.2% 11% 6.5%;filter:drop-shadow(3px 8px 7px #0009);border-radius:0;box-shadow:none}.device-brand{top:11.8%;left:7%;right:10%}.device-brand strong{font-size:13px}.device-brand b{width:24px;height:26px;font-size:23px;margin-right:5px}.device-brand i{display:none}.bezel{padding:5px;border-radius:8px}.screen,.screen:has(iframe){height:clamp(200px,53vw,350px);min-height:200px;border-radius:6px;aspect-ratio:auto!important}.screen #video:has(iframe){height:100%}.screen-empty{padding:15px 8px;height:100%;min-height:0}.screen-empty h2{font-size:13px;margin-top:17px}.screen-empty p{font-size:10px}.big-tape{width:175px;padding:10px 15px 15px}.big-tape .tape-reels b{width:33px;height:33px;border-width:5px}.big-tape>span{font-size:9px}.now{padding:10px 3px 3px}.now>div{display:block}.now h2{font-size:13px}.now p{font-size:10px;margin-top:3px}.now .heart{padding:3px;min-width:30px;font-size:23px}.timeline{padding:0 3px;gap:8px}.timeline output{font-size:8px}.transport{min-height:65px;padding:9px 3px 4px;gap:2px;justify-content:space-between}.transport>button{min-width:34px;min-height:42px;padding:6px}.transport svg{width:20px;height:20px}.transport>button.play{width:53px;height:53px;min-width:53px;min-height:53px}.play svg{width:23px;height:23px}.player-foot{order:3;margin-top:-12px;padding:0 9px;font-size:10px}.player-foot a{margin:4px 0 0}.rack{order:4;padding:38px 28px 75px;min-height:0;background:none;box-shadow:none;border:0}.rack-label{transform:rotate(-.5deg)}.rack-label strong{font-size:15px}.rack-label h1{font-size:31px}.rack-label i{font-size:10px}.note-symbol{font-size:27px}.rack-actions{margin-top:17px}.rack-actions .gold{font-size:12px}.songs{max-height:430px;gap:8px}.cassette{min-height:60px}.track-copy strong{font-size:12px}.track-copy small{font-size:10px}.mini-tape{width:40px}.song-pick{gap:7px}.songs .heart{padding:3px;font-size:22px}.privacy{order:5;margin:0 8px;font-size:10px}.desk[data-view=theater] .device{padding:5px;border-radius:10px}.desk[data-view=theater] .screen,.desk[data-view=theater] .screen:has(iframe){height:clamp(220px,62vw,390px);aspect-ratio:auto!important;min-height:220px}.desk[data-view=theater] .screen #video:has(iframe){height:100%}.desk[data-view=theater] .screen-empty{min-height:220px}.desk[data-view=theater] .now,.desk[data-view=theater] .timeline{padding-left:8px;padding-right:8px}.desk[data-view=theater] .rack{padding:38px 28px 75px}.desk[data-view=theater] .stage-top{margin:0;justify-content:center}.desk[data-view=theater] .transport{padding:9px 2px 6px;margin:3px 5px 0}}
@media(max-width:360px){.desk{padding:12px 7px 24px}.device{padding:23% 7.5% 12% 6%}.device-brand{top:8%}.device-brand strong{font-size:11px}.device-brand b{width:21px;height:23px;font-size:20px}.transport>button{min-width:30px;padding:5px}.transport>button.play{min-width:47px;width:47px;min-height:47px;height:47px}.rack,.desk[data-view=theater] .rack{padding:33px 23px 68px}.rack-label{padding:12px 8px}.rack-label strong{font-size:13px}.rack-label h1{font-size:28px}.rack-label i{font-size:9px}.note-symbol{font-size:21px}.mini-tape{width:33px;gap:5px}.track-copy strong{font-size:11px}.track-number{min-width:14px}.song-pick{gap:5px}.song-menu summary{padding:5px}}

/* V0.3: anchor live content to the actual opening in the 1536 x 1024 chassis.
   Its inner window is x=5.5..90%, y=21..87%; no controls cover the metal. */
.desk[data-view=cassette] .device{padding:0;aspect-ratio:3/2;min-height:580px;width:100%;background-size:100% 100%}
.desk[data-view=cassette] .device-brand{top:10.2%;left:8%;right:12%;height:8%;margin:0;align-items:center}
.desk[data-view=cassette] .device-brand strong{font-size:clamp(13px,1.4vw,21px)}
.desk[data-view=cassette] .bezel{position:absolute;inset:22% 10.5% 14% 6.5%;display:flex;flex-direction:column;min-height:0;padding:8px 9px 10px;border-radius:12px;box-shadow:inset 0 1px 2px #ffffff0d;background:#0a0e0c}
.desk[data-view=cassette] .screen{flex:1 1 0;min-height:200px;height:auto;aspect-ratio:auto!important;border-radius:7px}
.desk[data-view=cassette] .screen:has(iframe){height:auto}
.desk[data-view=cassette] #video{height:100%}
.desk[data-view=cassette] .screen-empty{height:100%;min-height:0}
.desk[data-view=cassette] .now{flex:0 0 auto;padding:9px 5px 2px}
.desk[data-view=cassette] .now>div{flex:1;display:block;min-width:0}
.desk[data-view=cassette] .now h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;line-height:1.4}
.desk[data-view=cassette] .now p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:2px 0 0}
.desk[data-view=cassette] .timeline{flex:0 0 23px}
.desk[data-view=cassette] .transport{flex:0 0 75px;min-height:75px;margin-top:3px;padding:7px 5px 3px;box-shadow:none;border-radius:0;background:linear-gradient(#171b16,#090d0b)}
.desk[data-view=cassette] .transport>button.play{width:58px;height:58px;min-width:58px;min-height:58px}
.desk[data-view=cassette] .transport>button[aria-pressed=true]{color:#ffdc43}
.stage>.unavailable{margin:8px;color:#ffe6bd}
.rack-label{padding-top:10px;padding-bottom:9px}
.rack{min-height:650px}
@media(min-width:1101px){.desk[data-view=cassette] .stage-top{margin-bottom:5px}.rack-label h1{margin:3px 0}}
@media(min-width:1650px){.desk[data-view=cassette] .device{min-height:610px}}
@media(max-width:1100px) and (min-width:1001px){.desk[data-view=cassette] .device-brand strong{font-size:12px}.desk[data-view=cassette] .bezel{padding:6px}.desk[data-view=cassette] .device{min-height:580px}}
@media(max-width:1000px){
 .desk[data-view=cassette] .device{aspect-ratio:auto;min-height:590px;height:590px}
 .desk[data-view=cassette] .device-brand{top:9.8%;left:8%;right:12%;height:8%}
 .desk[data-view=cassette] .device-brand strong{font-size:13px}
 .desk[data-view=cassette] .bezel{inset:21.8% 10.5% 14% 6.5%;padding:6px;border-radius:9px}
 .desk[data-view=cassette] .now h2{font-size:12px}
 .desk[data-view=cassette] .now p{font-size:10px}
 .desk[data-view=cassette] .transport{flex-basis:65px;min-height:65px;gap:1px;padding:6px 1px 3px}
 .desk[data-view=cassette] .transport>button{min-width:31px;padding:5px}
 .desk[data-view=cassette] .transport>button.play{width:48px;height:48px;min-width:48px;min-height:48px}
 .stage>.unavailable{order:3;margin:0 8px}
 .rack{min-height:0}
}
@media(max-width:360px){.desk[data-view=cassette] .device-brand strong{font-size:11px}.desk[data-view=cassette] .device-brand b{margin-right:3px}.desk[data-view=cassette] .transport>button{min-width:29px;padding:4px}}

@media(max-width:1000px){.studio,.desk[data-view=theater] .studio{flex-direction:column}.stage-top{width:100%}.player-foot{width:100%}}

/* Search stays in the tool; only an explicit submission contacts YouTube. */
.discovery{width:min(94vw,780px);max-height:88dvh;overflow:auto;padding:26px;background:radial-gradient(ellipse at top right,#60421c55,transparent 55%),#171b15;border:1px solid #c7a355}
.discovery .dialog-head{position:sticky;top:-26px;background:#171b15;z-index:2;padding:8px 0 15px}
.discovery .dialog-head h2{font-family:WorkmanHand,cursive;font-size:34px;margin-top:5px}
.discovery form>label{font-size:12px;margin:12px 0 8px;color:#caba9e}
.discovery-search{display:flex;gap:10px}.discovery-search input{margin:0;flex:1}.discovery-search .gold{width:auto;min-width:80px;margin:0}
.discovery-status{font-size:13px;line-height:1.7;color:#f0d798;padding:16px 0;min-height:54px}
.discovery-results{display:grid;gap:10px}.discovery-result{display:grid;grid-template-columns:144px minmax(0,1fr);gap:16px;padding:13px;background:#25281e;border:1px solid #83734566;border-radius:10px;align-items:start}.discovery-result img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:5px}.youtube-source{font-size:10px;color:#ddd0ba}.discovery-result h3{font-size:14px;line-height:1.5;margin:5px 0;overflow-wrap:anywhere}.discovery-result p{font-size:11px;color:#c3baa7;overflow-wrap:anywhere}.result-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.result-actions button{font-size:11px;min-height:36px;padding:6px 10px}.result-actions button[data-play=true]{color:#ffe17b;border-color:#b9943f}
.discovery-bottom{border-top:1px solid #77613b66;margin-top:18px;padding-top:15px}.discovery-bottom>button{font-size:12px}.discovery-bottom p{font-size:11px;line-height:1.7;color:#b9af99;margin-top:12px}
@media(max-width:600px){.discovery{padding:17px}.discovery .dialog-head{top:-17px}.discovery .dialog-head h2{font-size:27px}.discovery-search{gap:6px}.discovery-search input{padding:11px;font-size:13px}.discovery-search .gold{min-width:61px;font-size:12px}.discovery-result{grid-template-columns:90px minmax(0,1fr);gap:9px;padding:10px}.discovery-result h3{font-size:12px}.result-actions{grid-column:1/-1;gap:5px}.result-actions button{font-size:10px;padding:5px 7px}.discovery .eyebrow{font-size:8px}}
/* Preserve the reference's generous video area on desktop. */
@media(min-width:1101px){.desk[data-view=cassette] .device{aspect-ratio:1.35;min-height:680px}.rack{min-height:720px}}
