  .align-bt{
    width:auto;
    height:2em;
    padding:0 0.9em;
    font-weight:600;
    letter-spacing:0.05em;
    border-radius:999px;
    gap:0.4167em;
  }
  .align-row{
    display:flex;
    justify-content:center;
    gap:0.375em;
  }
  .align-row .align-bt{
    width:auto;
    padding:0 0.9em;
    font-size:0.9em;
  }
  .align-row.is-dim{opacity:0.45;filter:saturate(0.55);}
  body{
    background-color:#324054;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  }
  .canvas-box{position:relative;}
  .cbt{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:3em;
    height:3em;
    margin:0;
    padding:0;
    font-family:inherit;
    font-size:1.4em;
    font-weight:600;
    line-height:1;
    color:#e2e8f0;
    background:linear-gradient(180deg,#334155,#1e293b);
    border:1px solid #475569;
    border-radius:14px;
    box-shadow:0 1px 2px rgba(0,0,0,0.4),0 4px 10px rgba(0,0,0,0.3);
    text-decoration:none;
    box-sizing:border-box;
    cursor:pointer;
    vertical-align:middle;
    text-align:center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout:none;
    transition:transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  }
  .cbt:active{
    background:linear-gradient(180deg,#1e293b,#0f172a);
    box-shadow:inset 0 2px 4px rgba(0,0,0,0.55);
    transform:translateY(1px) scale(0.97);
  }
  .cbt:focus-visible{
    outline:2px solid #60a5fa;
    outline-offset:2px;
  }
  .cbt:hover{
    background:linear-gradient(180deg,#3b506e,#24344d);
    box-shadow:0 2px 4px rgba(0,0,0,0.4),0 8px 16px rgba(0,0,0,0.35);
    transform:translateY(-1px);
  }
  .crash-toast{
    position:absolute;
    left:50%; top:30%;
    transform:translate(-50%,-50%) scale(0.96);
    opacity:0;
    visibility:hidden;
    transition:opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
    padding:10px 24px;
    box-sizing:border-box;
    background:linear-gradient(180deg,#3f1d1d 0%,#1c0d0d 100%);
    border:1px solid #ef4444;
    border-radius:14px;
    box-shadow:0 10px 24px rgba(2,6,23,0.5),0 2px 6px rgba(2,6,23,0.35);
    color:#fecaca;
    font-size:0.95em;
    font-weight:700;
    letter-spacing:.06em;
    text-align:center;
    white-space:nowrap;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    pointer-events:none;
    z-index:19;
  }
  .crash-toast.show{
    opacity:1;
    visibility:visible;
    transform:translate(-50%,-50%) scale(1);
    transition:opacity .2s ease, transform .2s ease, visibility 0s;
    pointer-events:auto;
    cursor:pointer;
  }
  .crash-toast.show:hover{filter:brightness(1.15);}
  .ctrl-pads{display:flex;justify-content:space-between;align-items:flex-start;}
  .ctrl-panel{
    flex:0 0 auto;
    width:min(600px,calc(100vw - 36px),calc((100vh - 36px)/2));
    height:min(600px,calc(100vw - 36px),calc((100vh - 36px)/2));
    width:min(600px,calc(100vw - 36px),calc((100dvh - 36px)/2));
    height:min(600px,calc(100vw - 36px),calc((100dvh - 36px)/2));
    max-width:100%;
    box-sizing:border-box;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    gap:0.875em;
    padding:1.125em 1.375em;
    background:linear-gradient(180deg,#1e293b 0%,#0f172a 100%);
    border:1px solid #334155;
    border-radius:18px;
    box-shadow:0 12px 28px rgba(2,6,23,0.45),0 2px 6px rgba(2,6,23,0.35);
    color:#e2e8f0;
  }
  .ctrl-title{
    margin:0;
    font-size:2em;
    font-weight:700;
    letter-spacing:0.14em;
    text-transform:uppercase;
    color:#94a3b8;
    text-align:center;
  }
  .dot{
    width:0.7em;
    height:0.7em;
    border-radius:50%;
    display:inline-block;
    flex:0 0 auto;
  }
  .dot-blue{background:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,0.22);}
  .dot-red{background:#ef4444;box-shadow:0 0 0 3px rgba(239,68,68,0.22);}
  .hint{display:flex;align-items:center;gap:0.3289em;flex-wrap:wrap;}
  .hint-lights{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    gap:1.0526em;
    color:#cbd5e1;
  }
  .hint-lights .hint-mid{
    color:#94a3b8;
    font-size:0.85em;
    letter-spacing:0.1em;
    text-transform:uppercase;
    text-align:center;
  }
  .hint-lights .hint-side{display:flex;align-items:center;gap:0.5263em;}
  .hint-lights .hint-side:last-child{justify-content:flex-end;}
  .hints{
    display:flex;
    flex-direction:column;
    gap:0.6579em;
    font-size:0.95em;
    line-height:1.5;
    color:#94a3b8;
  }
  .is-on{
    background:linear-gradient(180deg,#60a5fa,#3b82f6);
    border-color:#93c5fd;
    color:#0f172a;
  }
  .is-on:hover{
    background:linear-gradient(180deg,#7db8fd,#4b8ef7);
  }
  kbd{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:1.7em;
    padding:0.15em 0.3em;
    font-family:inherit;
    font-size:0.9em;
    font-weight:600;
    color:#e2e8f0;
    background:linear-gradient(180deg,#334155,#1e293b);
    border:1px solid #475569;
    border-bottom-width:2px;
    border-radius:6px;
    box-shadow:0 1px 0 rgba(255,255,255,0.06) inset;
  }
  .key{
    display:flex;
    align-items:center;
    gap:0.3289em;
    white-space:nowrap;
    color:#94a3b8;
  }
  .keys{
    display:grid;
    grid-template-columns:repeat(4,auto);
    column-gap:0.6579em;
    row-gap:0.4605em;
    justify-content:space-between;
    align-items:center;
  }
  .landed-toast{
    position:absolute;
    left:50%; top:46%;
    transform:translate(-50%,-50%) scale(0.94);
    opacity:0;
    visibility:hidden;
    transition:opacity .7s ease, transform .7s ease, visibility 0s linear .7s;
    padding:16px 28px;
    box-sizing:border-box;
    background:linear-gradient(180deg,#1e293b 0%,#0f172a 100%);
    border:1px solid #334155;
    border-radius:18px;
    box-shadow:0 12px 28px rgba(2,6,23,0.45),0 2px 6px rgba(2,6,23,0.35);
    color:#e2e8f0;
    text-align:center;
    white-space:nowrap;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    pointer-events:none;
    z-index:20;
  }
  .landed-toast .t-hint{margin-top:7px;font-size:.7em;letter-spacing:.05em;color:#8793a8;}
  .landed-toast .t-sub{margin-top:5px;font-size:.85em;color:#94a3b8;}
  .landed-toast .t-title{font-size:1.05em;font-weight:700;letter-spacing:.08em;color:#4ade80;}
  .landed-toast.show{
    opacity:1;
    visibility:visible;
    transform:translate(-50%,-50%) scale(1);
    transition:opacity .7s ease, transform .7s ease, visibility 0s;
    pointer-events:auto;
    cursor:pointer;
  }
  .landed-toast.show:hover{filter:brightness(1.12);}
  main{
    background-color:#324054;
  }
  .mode-bt{
    width:auto;
    height:2em;
    padding:0 0.85em;
    font-size:0.9em;
    font-weight:600;
    letter-spacing:0.04em;
    border-radius:999px;
    text-transform:none;
  }
  .mode-sw{display:inline-flex;gap:0.4644em;}
  .pad{border-collapse:collapse;}
  .pad td{padding:0.1875em;}
  .pitch{
    display:flex;
    flex-direction:column;
    align-items:center;
    flex:0 0 auto;
    padding-top:0.25em;
  }
  .pitch-body{display:flex;align-items:center;gap:0.5em;}
  .pitch-label{
    font-size:0.9em;
    font-weight:600;
    letter-spacing:0.05em;
    color:#cbd5e1;
    white-space:nowrap;
    margin-bottom:0.4861em;
    margin-right:1.6667em;
  }
  .pitch-needle{
    position:absolute;
    left:-0.1875em;
    top:0;
    width:1.3125em;
    height:0.1875em;
    border-radius:0.125em;
    background:#60a5fa;
    box-shadow:0 0 5px rgba(96,165,250,0.75);
    transform:translateY(0);
    transition:transform 0.06s linear;
    z-index:2;
  }
  .pitch-scale{
    position:relative;
    width:1.0625em;
    height:9.75em;
  }
  .pitch-scale::before{
    content:"";
    position:absolute;
    inset:0;
    background-image:
      repeating-linear-gradient(180deg,#cbd5e1 0 0.125em,transparent 0.125em 1.25em),
      repeating-linear-gradient(180deg,#64748b 0 0.125em,transparent 0.125em 1.25em),
      linear-gradient(#475569,#475569);
    background-size:0.875em 100%,0.4375em 100%,0.125em 100%;
    background-position:0 0,0 0.625em,0 0;
    background-repeat:no-repeat;
  }
  .pitch-stage{
    position:relative;
    width:2.875em;
    height:9.75em;
    border-radius:0.8125em;
    background:linear-gradient(180deg,#080d18,#020617);
    box-shadow:inset 0 5px 10px rgba(0,0,0,0.95),
               inset 0 -4px 8px rgba(0,0,0,0.9),
               inset 0 0 0 1px rgba(15,23,42,0.9),
               0 1px 0 rgba(255,255,255,0.07);
  }
  .pitch-wheel{
    position:absolute;
    left:0.375em;
    right:0.375em;
    top:0.4375em;
    bottom:0.4375em;
    border-radius:0.75em;
    cursor:grab;
    touch-action:none;
    user-select:none;
    -webkit-user-select:none;
    -webkit-touch-callout:none;
    background-image:
      repeating-linear-gradient(180deg,
        rgba(11,18,32,0) 0 3px, rgba(11,18,32,0.34) 3px 4.4px),
      linear-gradient(180deg,rgba(11,18,32,0.42) 0,rgba(11,18,32,0) 15%,
                             rgba(11,18,32,0) 84%,rgba(11,18,32,0.55) 100%),
      linear-gradient(90deg,#ffffff 0%,#eef1f5 42%,#d3d9e0 78%,#b7bfca 100%);
    background-position:0 var(--spinY,0px),0 0,0 0;
    background-repeat:repeat,no-repeat,no-repeat;
    box-shadow:0 3px 7px rgba(0,0,0,0.6),
               inset 1.5px 0 0 rgba(255,255,255,0.8),
               inset -1.5px 0 0 rgba(15,23,42,0.25);
    z-index:2;
  }
  .pitch-wheel:active{cursor:grabbing;}
  .pitch-wheel:focus-visible{
    outline:2px solid #60a5fa;
    outline-offset:3px;
  }
  .ring-badge{
    position:absolute;
    left:50%; top:16px;
    transform:translateX(-50%);
    padding:7px 20px;
    box-sizing:border-box;
    background:rgba(15,23,42,0.88);
    border:1px solid #38bdf8;
    border-radius:999px;
    box-shadow:0 6px 16px rgba(2,6,23,0.4);
    color:#e2e8f0;
    font-size:0.82em;
    font-weight:700;
    letter-spacing:.07em;
    text-align:center;
    white-space:nowrap;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    pointer-events:none;
    z-index:18;
  }
  .ring-badge.done{
    border-color:#4ade80;
    color:#4ade80;
    background:rgba(9,32,20,0.92);
    box-shadow:0 6px 18px rgba(74,222,128,0.25);
  }
  .scene-canvas{
    width:600px;
    height:600px;
    max-width:min(600px,calc(100vw - 36px),calc((100vh - 36px)/2));
    max-height:min(600px,calc(100vw - 36px),calc((100vh - 36px)/2));
    max-width:min(600px,calc(100vw - 36px),calc((100dvh - 36px)/2));
    max-height:min(600px,calc(100vw - 36px),calc((100dvh - 36px)/2));
    border-radius:18px;
    box-shadow:0 12px 28px rgba(2,6,23,0.45),0 2px 6px rgba(2,6,23,0.35);
    -ms-touch-action:none;
    touch-action:none;
    cursor:grab;
  }
  .stage-row{
    display:flex;
    flex-wrap:wrap;
    align-items:stretch;
    justify-content:center;
    gap:16px;
  }
  table{border-collapse:collapse;}
  td,th{padding:4px;}
  .view-bt{
    width:100%;
    height:2.7em;
    font-size:1em;
    letter-spacing:0.06em;
    border-radius:999px;
    gap:0.5625em;
  }
  .view-bt .cam-dot{
    width:0.7em;
    height:0.7em;
    border-radius:50%;
    background:#64748b;
    box-shadow:0 0 0 3px rgba(100,116,139,0.25);
    transition:background 0.12s ease, box-shadow 0.12s ease;
    flex:0 0 auto;
  }
  .view-bt.is-on .cam-dot{
    background:#0f172a;
    box-shadow:0 0 0 3px rgba(15,23,42,0.25);
  }
  .view-row{display:flex;justify-content:center;}
  @media (max-width:640px), (orientation:landscape) and (max-width:1245px){
    .canvas-box{align-self:flex-start;}
    .ctrl-pads{
      display:flex;
      flex-wrap:wrap;
      justify-content:space-evenly;
      align-items:flex-start;
      gap:0.625em 0;
    }
    .hint-lights{
      display:flex;
      flex-wrap:wrap;
      justify-content:center;
      align-items:center;
      gap:0.3947em 0.9211em;
    }
    .hint-lights .hint-mid{flex-basis:100%;order:3;}
    .keys{
      grid-template-columns:repeat(2,auto);
      justify-content:center;
      column-gap:1.5789em;
    }
    .pitch-label{margin-right:0.5556em;}
  }
  @media (orientation:landscape){
    .stage-row{flex-wrap:nowrap;}
    .scene-canvas{
      max-width:min(600px,calc((100vw - 40px)/2),calc(100vh - 20px));
      max-height:min(600px,calc((100vw - 40px)/2),calc(100vh - 20px));
      max-width:min(600px,calc((100vw - 40px)/2),calc(100dvh - 20px));
      max-height:min(600px,calc((100vw - 40px)/2),calc(100dvh - 20px));
    }
    .ctrl-panel{
      flex:0 0 auto;
      width:min(600px,calc((100vw - 40px)/2),calc(100vh - 20px));
      height:min(600px,calc((100vw - 40px)/2),calc(100vh - 20px));
      width:min(600px,calc((100vw - 40px)/2),calc(100dvh - 20px));
      height:min(600px,calc((100vw - 40px)/2),calc(100dvh - 20px));
    }
  }
  @media (orientation:landscape) and (max-width:1245px){
    .ctrl-panel{
      padding:0.875em 1em;
    }
    .pad .cbt{font-size:1em;}
  }
  @media (orientation:portrait) and (max-width:640px){
    .ctrl-panel{font-size:clamp(13.5px,2.4vw,16px);}
    .pad .cbt{font-size:1.1em;}
  }
  @media (prefers-reduced-motion:reduce){
    *,*::before,*::after{
      transition:none!important;
      animation:none!important;
    }
  }
