*{box-sizing:border-box}

html,body{
 margin:0;
 width:100%;
 min-height:100%;
 overflow-x:hidden;
 background:#aeb3bf;
 font-family:system-ui,-apple-system,sans-serif;
 color:#181b27;
}
button,input,a{font:inherit}
button{touch-action:manipulation}

.board{
 width:100%;
 min-height:100dvh;
 background:#b5bbc7;
}
.board-shell{
 width:100%;
 min-height:100dvh;
 padding:
  max(9px,env(safe-area-inset-top))
  max(9px,env(safe-area-inset-right))
  max(9px,env(safe-area-inset-bottom))
  max(9px,env(safe-area-inset-left));
 display:flex;
 flex-direction:column;
 gap:9px;
 background:
  radial-gradient(ellipse at 50% 29%,#f1f2f6a8,transparent 60%),
  linear-gradient(135deg,
   #e8eaf0 0%,#a6acba 26%,
   #d0d4de 51%,#9299a9 77%,#c4c8d2 100%);
 box-shadow:inset 0 0 0 2px #51596b,
            inset 0 0 30px #ffffff66;
}

.brand{
 display:flex;
 justify-content:space-between;
 align-items:center;
 gap:8px;
 min-height:34px;
}
.brand-name{
 display:flex;
 align-items:center;
 gap:8px;
 min-width:0;
}
.brand-name strong{
 font-size:clamp(12px,3.6vw,19px);
 font-weight:1000;
 white-space:nowrap;
}
.power-led,.live-dot{
 flex:none;
 border-radius:50%;
 background:#ff2944;
 box-shadow:0 0 12px #ff3049;
}
.power-led{width:15px;height:15px}
.live-dot{width:8px;height:8px}
.version{
 font-size:clamp(9px,2.2vw,12px);
 font-weight:900;
 letter-spacing:1px;
 white-space:nowrap;
}

.top-section{
 width:100%;
 min-width:0;
 display:grid;
 grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr);
 gap:9px;
 align-items:center;
}

.display-zone{
 width:100%;
 min-width:0;
 display:grid;
 place-items:center;
}
.display-outer{
 width:100%;
 max-width:390px;
 aspect-ratio:1;
 border-radius:50%;
 padding:5%;
 background:conic-gradient(
  from 200deg,#242731,#f3f4f8 15%,
  #777c8b 30%,#151721 48%,
  #d3d7e0 66%,#353946 82%,#242731);
 box-shadow:0 10px 18px #0005,
            inset 0 0 0 2px #454b59;
}
.display-ring{
 width:100%;
 height:100%;
 padding:5%;
 border-radius:50%;
 background:linear-gradient(140deg,#0c0e15,#676c79,#171922);
}
.display-core{
 width:100%;
 height:100%;
 border-radius:50%;
 background:radial-gradient(circle,#31040d,#080104 65%,#000);
 position:relative;
 overflow:hidden;
 border:2px solid #120c12;
 box-shadow:inset 0 0 20px #000;
}
.display-glow{
 position:absolute;
 inset:0;
 background:radial-gradient(circle,#d7182c18,transparent 65%);
 pointer-events:none;
}
.display-grid{
 position:absolute;
 inset:12%;
 border-radius:50%;
 background:repeating-radial-gradient(
  circle,transparent 0 13%,
  #ff314719 13.5% 14%,
  transparent 14.5% 22%);
 pointer-events:none;
}
.display-scan{
 position:absolute;
 width:80%;
 left:10%;
 top:50%;
 height:1px;
 background:#ff2745;
 box-shadow:0 0 12px #ff2446;
 pointer-events:none;
 animation:scopePulse 3s ease-in-out infinite;
}
@keyframes scopePulse{
 0%,100%{opacity:.45}
 50%{opacity:1}
}
#scope{
 position:absolute;
 inset:0;
 width:100%;
 height:100%;
 display:block;
}
.display-top,.display-mode,.display-time{
 position:absolute;
 width:100%;
 left:0;
 text-align:center;
 pointer-events:none;
}
.display-top{
 top:21%;
 color:#ff3d54;
 font-size:clamp(10px,3vw,18px);
 letter-spacing:3px;
 font-weight:1000;
 text-shadow:0 0 8px #ff263e;
}
.display-mode{
 bottom:22%;
 color:#ff5369;
 font-size:clamp(9px,2.7vw,14px);
 font-weight:900;
 letter-spacing:2px;
}
.display-time{
 bottom:12%;
 color:#c9a0a8;
 font-size:clamp(9px,2.5vw,14px);
}

.action-grid{
 min-width:0;
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 grid-template-rows:repeat(3,minmax(0,1fr));
 gap:7px;
 align-self:stretch;
}
.action-grid button{
 min-width:0;
 min-height:42px;
 padding:6px 3px;
 border:2px solid #454b5a;
 border-radius:12px;
 background:linear-gradient(145deg,#434756,#13151f);
 color:#fff;
 font-weight:900;
 font-size:clamp(9px,2.5vw,14px);
 line-height:1.15;
 box-shadow:inset 0 1px 2px #fff3,0 3px 6px #0003;
 cursor:pointer;
}
.action-grid .selected{
 border-color:#ff324c;
 color:#ff6075;
}
.action-grid .auto-button{
 border-color:#f33750;
 background:linear-gradient(135deg,#820e29,#26070e);
 display:flex;
 flex-direction:column;
 align-items:center;
 justify-content:center;
 gap:3px;
}
.auto-button small{
 font-size:clamp(7px,1.7vw,9px);
 color:#fbd5dc;
}
.action-grid button:active{
 transform:scale(.98);
}

.upload-line{
 width:100%;
 display:grid;
 grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);
 gap:8px;
 align-items:stretch;
 height:49px;
 flex:none;
}
.upload{
 display:flex;
 align-items:center;
 justify-content:center;
 position:relative;
 width:100%;
 min-width:0;
 height:49px;
 min-height:0;
 padding:5px;
 overflow:hidden;
 border:2px solid #454b59;
 border-radius:12px;
 background:linear-gradient(#363a47,#141720);
 color:white;
 font-size:clamp(11px,3vw,17px);
 font-weight:1000;
 text-align:center;
 cursor:pointer;
}
.upload input{
 position:absolute;
 inset:0;
 width:100%;
 height:100%;
 opacity:0;
 cursor:pointer;
}
.live-counter{
 height:49px;
 min-width:0;
 display:flex;
 align-items:center;
 justify-content:center;
 gap:5px;
 padding:4px;
 background:linear-gradient(#2c202b,#100b11);
 color:white;
 border:2px solid #963043;
 border-radius:12px;
 font-size:clamp(9px,2.3vw,12px);
 font-weight:900;
 white-space:nowrap;
}
#liveNumber{
 color:#ff6e82;
 font-variant-numeric:tabular-nums;
}

.song-line{
 min-width:0;
 font-size:11px;
 font-weight:800;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
}
.playback-progress{
 width:100%;
 display:flex;
 flex-direction:column;
 gap:4px;
}
#seek{
 width:100%;
 accent-color:#fa304a;
 margin:0;
}
.timestamps{
 width:100%;
 display:flex;
 justify-content:space-between;
 font-size:11px;
 font-weight:900;
}

.account-row{
 display:grid;
 width:100%;
 grid-template-columns:1fr 1fr;
 gap:8px;
}
.account-row a{
 display:grid;
 place-items:center;
 min-height:45px;
 border-radius:12px;
 text-decoration:none;
 color:#fff;
 font-weight:1000;
 font-size:clamp(12px,3vw,17px);
}
#signupLink{
 background:linear-gradient(110deg,#7533dd,#a65af5);
}
#loginLink{
 background:linear-gradient(#29213d,#151323);
 border:2px solid #7862b4;
}

.slots-section{
 flex:1 0 auto;
 width:100%;
 min-height:300px;
}
.slots-grid{
 display:grid;
 width:100%;
 grid-template-columns:repeat(3,minmax(0,1fr));
 grid-template-rows:repeat(4,minmax(68px,1fr));
 gap:8px;
}
.slots-grid button{
 width:100%;
 min-width:0;
 min-height:68px;
 border:2px solid #737989;
 border-radius:12px;
 background:linear-gradient(145deg,#dfe2e9,#aeb4c2);
 color:#525967;
 box-shadow:inset 0 2px 2px #fff9,
            inset 0 -3px 6px #0002,
            0 3px 6px #0002;
 font-size:14px;
 font-weight:1000;
}
.slots-grid button:disabled{
 opacity:1;
 cursor:default;
}
.message{
 font-size:11px;
 line-height:1.35;
 text-align:center;
 min-height:16px;
 color:#343a4a;
}
.engine-controls{
 display:none!important;
}

@media(max-width:390px){
 .board-shell{gap:6px}
 .top-section{gap:6px}
 .action-grid{gap:5px}
 .action-grid button{
  border-radius:9px;
  font-size:9px;
 }
 .slots-grid{gap:5px}
 .slots-grid button{min-height:60px}
 .slots-section{min-height:270px}
}
@media(max-height:700px){
 .slots-grid button{min-height:55px}
 .slots-section{min-height:240px}
 .board-shell{gap:5px}
}
@media(min-width:760px){
 .board-shell{
  max-width:1050px;
  margin:auto;
 }
 .top-section{
  grid-template-columns:1fr 1fr;
 }
 .display-outer{
  width:min(100%,360px);
 }
}
@media(prefers-reduced-motion:reduce){
 .display-scan{animation:none}
}
