/* SPDX-License-Identifier: GPL-3.0-only
 * fm1-kit: the FM-1 simulator's panel (the same in every firmware's simulator), on theme.css's tokens.
 * The markup: .topbar, .synth > .top (.kgrid | .lcd | .right), #kbwell > #keys, .help (as M-vance's sim/index.html). */
* { box-sizing: border-box; }
body { margin: 0; display: flex; flex-direction: column; align-items: center; min-height: 100vh; }
.kit-top { align-self: stretch; }
.page { display: flex; flex-direction: column; align-items: center; padding: 18px; width: 100%; }
.topbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-bottom: 14px; }
.mode { font-size: 12px; padding: 6px 10px; border-radius: 6px; background: var(--raised); color: var(--dim); white-space: nowrap; }
.mode.on { background: var(--fill); color: var(--ok, var(--theme)); }
.link { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 10px; border-radius: 6px;
        background: var(--raised); color: var(--text); }
.link.off { opacity: 0.45; }

.synth { background: var(--surf); border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: 800px;
         max-width: 100%; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.top { display: grid; grid-template-columns: auto 240px 1fr; gap: 16px; align-items: start; }

/* knobs: the screen's knob, flat: a ring, a cap, the pointer in the theme colour */
.kgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.kwrap { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 60px; }
.klabel { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--dim); text-transform: uppercase; height: 1em; white-space: nowrap; }
.knob { width: 46px; height: 46px; border-radius: 50%; position: relative; cursor: ns-resize; touch-action: none;
        background: var(--raised); border: 3px solid var(--line); }
.knob:hover { border-color: var(--theme); }
.knob .ind { position: absolute; left: 50%; top: 4px; width: 3px; height: 13px; margin-left: -1.5px; border-radius: 2px;
             background: var(--text); transform-origin: 50% 16px; }

/* the screen */
.lcd { background: #000; border-radius: 12px; padding: 10px; box-shadow: inset 0 0 0 2px var(--line); }
#screen { width: 220px; height: 220px; display: block; image-rendering: pixelated; border-radius: 4px; background: #000; }

/* knob row and buttons */
.right { display: flex; flex-direction: column; gap: 12px; }
.krow { display: flex; gap: 10px; justify-content: space-between; }
.btngrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.btngrid button, .octrow button {
  justify-content: center; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: var(--text);
  background: var(--raised); border: 1px solid var(--line); border-radius: 7px; padding: 9px 0; }
.btngrid button.rec { color: var(--warn); }
.btngrid button.on, .octrow button.on, .btngrid button.lit { background: var(--theme); color: var(--on-theme); border-color: var(--theme); }
.octrow { grid-column: 1 / span 2; display: flex; gap: 10px; margin-top: 2px; }
.octrow button { flex: 1; }

/* the keyboard */
#kbwell { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 18px;
          display: flex; justify-content: center; overflow-x: auto; }
#keys { position: relative; height: 120px; }
.key { position: absolute; top: 0; cursor: pointer; touch-action: none; border: 1px solid var(--bg); }
.key.white { width: 34px; height: 120px; border-radius: 0 0 8px 8px; z-index: 1; background: var(--raised);
             box-shadow: inset 0 -4px 0 var(--line); }
.key.black { width: 22px; height: 74px; border-radius: 0 0 6px 6px; z-index: 2; background: var(--line); }
[data-theme="paper"] .key.black { background: var(--text); }
.key.on { background: var(--theme) !important; }

.help { color: var(--dim); background: var(--surf); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px;
        font-size: 12px; margin-top: 12px; text-align: center; max-width: 800px; line-height: 1.5; }
.help kbd { font: 11px ui-monospace, monospace; background: var(--raised); border-radius: 3px; padding: 0 4px; color: var(--text); }
@media (max-width: 820px) { .top { grid-template-columns: 1fr; justify-items: center; } }
