/* PINpossible. 1 CSS px = 1 iOS point. Positions are set in app.js from the measured geometry. */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html, body { height: 100%; background: #000; overflow: hidden; overscroll-behavior: none; touch-action: none;
    font-family: -apple-system, "SF Pro Text", "SF Pro", system-ui, sans-serif; color: #fff;
    -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
.layer { position: fixed; inset: 0; }
.hidden { display: none !important; }

#black { background: #000; }
/* performer reminder: deliberately dim, readable in your hand, not across a table */
#guide { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(310px, calc(100% - 40px));
         color: rgba(255,255,255,.5); font-size: 15px; line-height: 1.4; }
#guide ol { padding-left: 20px; }
#guide li { margin: 0 0 12px; padding-left: 2px; }
#guide .len { display: inline-block; min-width: 30px; margin: 4px 6px 0 0; padding: 3px 0; text-align: center; border-radius: 8px;
              border: 1px solid rgba(255,255,255,.28); color: rgba(255,255,255,.55); }
#guide .len.on { background: rgba(255,255,255,.22); color: #fff; border-color: rgba(255,255,255,.5); }
#guide #gmsg { margin-top: 6px; color: rgba(255,255,255,.62); }
#guide #gmsg.err { color: rgba(255,120,110,.85); }
#guide .hint { margin-top: 8px; font-size: 12px; color: rgba(255,255,255,.3); }
#guide.busy ol, #guide.busy .hint { display: none; }
#shot canvas, #backdrop canvas, #bright canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#pass { background: #000; overflow: hidden; }
#backdrop, #bright { position: absolute; inset: 0; transform-origin: 50% 50%; }
#bright { opacity: 0; }
#chrome, #ui { position: absolute; inset: 0; }
.txt { position: absolute; white-space: nowrap; color: #fff; }

#padlock { position: absolute; width: 16px; height: 22px; margin: -11px 0 0 -8px; }

#dots { position: absolute; left: 0; right: 0; height: 13px; }
.dot { position: absolute; top: 0; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%;
       border: 1.333px solid #fff; background: transparent; }
.dot.f { background: #fff; }
#dots.shake { animation: shake .49s linear; }
@keyframes shake { 0%{transform:translateX(0)} 16%{transform:translateX(-12px)} 35%{transform:translateX(12px)}
  53%{transform:translateX(-9px)} 71%{transform:translateX(9px)} 90%{transform:translateX(-5px)} 100%{transform:translateX(0)} }

.key { position: absolute; border-radius: 50%; will-change: transform, opacity; }
.key canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.key .glow { position: absolute; border-radius: 50%; background: rgba(255,255,255,.34); opacity: 0; pointer-events: none;
             transition: opacity .28s ease-out; mix-blend-mode: plus-lighter; }
.key.down .glow { opacity: 1; transition: opacity .04s; }
.key b, .key i { position: absolute; left: 0; right: 0; text-align: center; font-style: normal; pointer-events: none; color: #fff; }
.key b { font-weight: 400; }
.key i { font-weight: 600; }

.btn::before { content: ''; position: absolute; inset: -12px -18px; }   /* bigger touch area, text stays put */
.btn.press { opacity: .45; transition: opacity 0s; }
.btn { transition: opacity .25s; }

#tune { position: fixed; inset: 0; z-index: 50; background: rgba(12,12,16,.96); overflow-y: auto; touch-action: pan-y;
        -webkit-overflow-scrolling: touch; padding: calc(env(safe-area-inset-top) + 12px) 14px calc(env(safe-area-inset-bottom) + 24px);
        font: 14px/1.35 -apple-system, system-ui, sans-serif; -webkit-user-select: text; user-select: text; }
#tune h2 { font-size: 18px; margin: 4px 0 10px; }
#tune h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #8e8e93; margin: 16px 0 6px; }
#tune .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: .5px solid #2c2c2e; }
#tune .row label { flex: 1; color: #ddd; }
#tune input[type=number], #tune select { width: 92px; background: #1c1c1e; color: #fff; border: .5px solid #3a3a3c; border-radius: 7px; padding: 5px 6px; font-size: 14px; }
#tune input[type=checkbox] { width: 22px; height: 22px; }
#tune .bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
#tune button { background: #2c2c2e; color: #fff; border: 0; border-radius: 9px; padding: 9px 12px; font-size: 14px; }
#tune button.primary { background: #0a84ff; }
#tune pre { white-space: pre-wrap; word-break: break-all; color: #9ad; font-size: 12px; background: #000; padding: 8px; border-radius: 8px; }
#tune .preview { width: 100%; border-radius: 10px; margin-top: 8px; position: relative; }
#tune .preview canvas { width: 100%; display: block; border-radius: 10px; }
#tune .preview canvas + canvas { position: absolute; inset: 0; height: 100%; }
