html,body{background:#171c14;color:#e4d7b1}body{background:radial-gradient(ellipse at 50% 20%,#3a3523,#13190f)}nav{height:34px;background:linear-gradient(#343a29,#20271d);border-top:1px solid #847547;color:#b9aa7c;font-family:Georgia,"Microsoft YaHei",serif;padding:0 18px;letter-spacing:.4px}nav a{color:#c4b17c;text-decoration:none}nav button{color:#e4d6ae;background:linear-gradient(#53573b,#2a3425);border:1px solid #97824e;box-shadow:0 2px 0 #11160e;border-radius:4px;padding:2px 13px;line-height:22px}#stage{width:min(100vw,calc((100dvh - 34px)*1.85));max-height:calc(100dvh - 34px)}#dialog{background:linear-gradient(#39422e,#202a20);color:#e6d3a0;border:2px solid #9f8956;border-radius:8px;box-shadow:0 0 0 4px #272a1f,0 14px 50px #000b}#dialog h2{font-family:Georgia,"SimSun",serif;letter-spacing:1px}#dialog p{color:#d1c5a3}#dialog input{background:#192217;border-color:#8c7c50;color:#efe1ba;border-radius:4px}#dialog button{border-color:#a68d57;background:linear-gradient(#5a6247,#303f2c);color:#e8ddba;border-radius:4px}#dialog #dialog-accept{background:linear-gradient(#eedbb0,#bba06a);color:#32291a;border-color:#e9d29b}#jukebox{border-color:#a48d58}#sound-toggle:focus-visible,#music-open:focus-visible{outline:2px solid #efdca6;outline-offset:2px}::selection{background:#ae9553;color:#151e14}

/* Full-window tavern, without legacy footer. */
body{background:linear-gradient(#11190f33,#10160e99),url(/assets/retro-saloon.png) center/cover fixed}#stage{width:min(100vw,calc(100dvh * 2.25));height:min(100dvh,calc(100vw / 1.6));max-height:none;aspect-ratio:auto}canvas{background:transparent}
.jb-display{position:relative;padding-right:120px;min-height:135px}.jb-turntable{position:absolute;right:17px;top:26px;width:88px;height:88px}.jb-vinyl{display:block;width:80px;height:80px;border-radius:50%;border:2px solid #bfa366;background:repeating-radial-gradient(circle,#171c14 0 3px,#454834 4px,#171c14 5px);box-shadow:0 4px 12px #0009;animation:vinyl-spin 4s linear infinite;animation-play-state:paused}.jb-vinyl:after{content:"♠";position:absolute;inset:25px;border-radius:50%;background:#bba05f;color:#1d2c20;text-align:center;font-size:20px;line-height:30px}.jb-tonearm{position:absolute;right:0;top:0;width:7px;height:58px;background:linear-gradient(90deg,#675b3c,#eedab0,#74613b);transform:rotate(24deg);transform-origin:top;border-radius:4px}.jb-display[data-playing=true] .jb-vinyl{animation-play-state:running}#jukebox[open]{animation:jukebox-arrive .28s ease-out}@keyframes vinyl-spin{to{transform:rotate(360deg)}}@keyframes jukebox-arrive{from{opacity:0;transform:translateY(20px) scale(.96)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.jb-vinyl,#jukebox[open]{animation:none!important}}

/* Wood cabinet and brass console; only the song catalogue scrolls on desktop. */
#jukebox{width:min(980px,96vw);max-width:980px;height:min(690px,94dvh);max-height:94dvh;padding:18px 24px 22px;border:3px solid #ba9555;border-radius:30px 30px 12px 12px;background:repeating-linear-gradient(92deg,#3b281be6 0 3px,#291f18ee 5px 12px),linear-gradient(#60432a,#241b13);box-shadow:inset 0 0 0 6px #1a1e14,0 0 0 2px #675435,0 25px 90px #000c;overflow:hidden;gap:0 24px}
#jukebox[open]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);grid-template-rows:28px 74px minmax(0,1fr)}
.jb-top,.jb-masthead{grid-column:1/-1}.jb-top{color:#c4ad7a}.jb-masthead{margin:4px 0 16px;border-bottom:1px solid #a68b4f;padding-bottom:12px}.jb-masthead h2{font-size:29px;text-shadow:0 2px #000}.jb-masthead p{margin:5px 0 0;color:#d7c296}
.jb-console,.jb-catalog{min-width:0;min-height:0;background:linear-gradient(#30392b,#1c291f);border:1px solid #8d7c4e;border-radius:8px;padding:16px;box-shadow:inset 0 1px #d9c48244,0 4px 8px #0006}
.jb-console{display:flex;flex-direction:column}.jb-catalog{display:flex;flex-direction:column}.jb-display{min-height:150px;padding:17px 106px 18px 15px;background:radial-gradient(ellipse at 50% 0,#244633,#0c1c13);border-color:#8d925c;box-shadow:inset 0 3px 15px #000b}.jb-display>strong{font-size:23px;color:#eddfab}.jb-display>span{color:#c3b783}.jb-display-top{color:#cfbb7e;gap:8px}.jb-bars{color:#e1ba64}.jb-turntable{right:10px;top:32px}.jb-stations{margin:0 0 10px;gap:8px}.jb-stations button{background:linear-gradient(#53603d,#303e28);border-color:#a8955c;color:#e8d9b1;box-shadow:0 3px #101b12,inset 0 1px #ffffff22}.jb-stations button[aria-pressed=true]{background:linear-gradient(#f1dea7,#b68b48);color:#302515;border-color:#f3d590}
#jb-station-note{color:#d1c09a;font-size:12px;margin-bottom:11px;min-height:40px}#jb-tracks{flex:1;min-height:0;max-height:none;padding-right:7px}.jb-track{background:linear-gradient(100deg,#e5d5a8,#cbbb8c);border:1px solid #ae9660;border-radius:3px;box-shadow:0 3px 0 #101910;margin:0 0 10px;padding:9px;gap:10px}.jb-track.selected{border-color:#ffdc79;box-shadow:inset 0 0 0 2px #c29a49,0 0 10px #d9b76333;background:linear-gradient(100deg,#fae8b4,#ddc58c)}.jb-code{background:linear-gradient(#53482d,#2b3020);border-color:#877240;border-radius:3px;color:#f4dfaa}.jb-track-label strong{font-size:17px}.jb-track-label small{color:#505039}.jb-track-play{color:#5b6036}
.jb-progress{margin:18px 0 12px}.jb-controls{gap:6px}.jb-controls button,.jb-volume button{background:linear-gradient(#5b6344,#2c3a29);color:#e9dab1;border-color:#ac945d;box-shadow:0 3px #10180e,inset 0 1px #ded0a433}.jb-controls .jb-play{background:linear-gradient(#f4dfa5,#ba914b);border-color:#efce83;color:#302616}.jb-controls button{padding:10px 8px}.jb-volume{margin:18px 0}.jb-volume label{color:#d4c39a}.jb-volume output{color:#e6d6aa}.jb-footer{margin-top:auto;min-height:35px;padding-top:10px;color:#c4b58c}.jb-footer details[open]{max-height:100px;overflow:auto;scrollbar-width:thin}.jb-footer summary{color:#dfc995}
#jukebox input[type=range]{appearance:none;height:6px;border-radius:4px;background:linear-gradient(#121c13,#536046);border:1px solid #908151;flex:1;width:0}#jukebox input[type=range]::-webkit-slider-thumb{appearance:none;width:17px;height:17px;border-radius:50%;background:radial-gradient(circle at 35% 25%,#fff0bd,#bf9144 70%);border:2px solid #e7c77c;box-shadow:0 2px 4px #000b}#jukebox input[type=range]::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#d7b775;border:2px solid #f1d28c}#jukebox button:focus-visible{outline:2px solid #ffe3a0;outline-offset:3px}.jb-close{border:1px solid #a48b50;background:#293422;padding:0 8px;border-radius:5px;font-size:25px}
@media(max-height:660px) and (min-width:701px){#jukebox{padding:12px 18px;grid-template-rows:24px 58px minmax(0,1fr)}.jb-masthead{margin:0 0 8px;padding-bottom:6px}.jb-masthead h2{font-size:23px}.jb-console,.jb-catalog{padding:12px}.jb-display{min-height:116px;padding-top:10px}.jb-display>strong{font-size:18px;margin:7px 0}.jb-turntable{top:18px}.jb-volume{margin:12px 0}.jb-progress{margin:12px 0}.jb-footer{font-size:10px}.jb-masthead p{font-size:10px}}
@media(max-width:700px){#jukebox[open]{display:block;overflow-y:auto;height:auto;max-height:94dvh;padding:15px}.jb-masthead{margin:10px 0 14px}.jb-console{margin-bottom:14px}.jb-catalog{height:360px}.jb-footer{margin-top:8px}.jb-display{min-height:124px}.jb-masthead h2{font-size:23px}#jukebox{scrollbar-width:thin;scrollbar-color:#b49b63 #253321}}

.jb-console::after{content:'';order:1;flex:1;min-height:24px;margin:4px 0 15px;border:2px solid #78643d;border-radius:7px;background:repeating-linear-gradient(45deg,transparent 0 5px,#b7a26b30 6px 7px,transparent 8px 12px),repeating-linear-gradient(-45deg,#131f17 0 5px,#b7a26b30 6px 7px,#131f17 8px 12px);box-shadow:inset 0 3px 12px #000a}.jb-console .jb-footer{order:2}

/* Mobile landscape stage, including upright phones. Touch coordinates use the same rotation. */
#stage{--rotated:0;flex-shrink:0}
@media(max-width:1100px) and (max-height:1100px){
 #stage{position:fixed;left:50%;top:50%;width:calc(100vw - 2 * max(env(safe-area-inset-left),env(safe-area-inset-right)));height:calc(100dvh - 2 * max(env(safe-area-inset-top),env(safe-area-inset-bottom)));max-height:none;transform:translate(-50%,-50%)}
}
@media(max-width:1024px) and (orientation:portrait){
 #stage{--rotated:1;position:fixed;left:50%;top:50%;width:calc(100dvh - 2 * max(env(safe-area-inset-top),env(safe-area-inset-bottom)));height:calc(100vw - 2 * max(env(safe-area-inset-left),env(safe-area-inset-right)));max-height:none;transform:translate(-50%,-50%) rotate(90deg)}
}
@media(max-height:480px) and (orientation:landscape){
 #jukebox[open]{grid-template-rows:18px 42px minmax(0,1fr);padding:8px 14px;gap:0 12px}
 .jb-top{font-size:8px}.jb-masthead{margin:0 0 5px;padding:0 0 3px}.jb-masthead h2{font-size:18px}.jb-masthead p{font-size:9px;margin:2px 0}.jb-console,.jb-catalog{padding:8px}
 .jb-display{min-height:86px;padding:6px 88px 6px 9px}.jb-display>strong{font-size:16px;margin:4px 0}.jb-display>span{font-size:9px}.jb-turntable{transform:scale(.7);transform-origin:top right;top:9px}.jb-console::after{display:none}.jb-progress{margin:8px 0}.jb-controls button{padding:6px}.jb-volume{margin:9px 0}.jb-footer{min-height:20px;padding-top:4px;font-size:9px}.jb-footer summary{padding-top:3px}.jb-stations button{font-size:11px;padding:6px}.jb-stations{margin-bottom:5px}#jb-station-note{font-size:10px;min-height:24px;margin-bottom:5px}
}
