/* Keyboard Sampler — 見た目のルールは DESIGN.md(Figma「Keyboard Sampler UI」ページ D)に合わせる */

@font-face {
  font-family: 'Jersey 10';
  src: url('../fonts/jersey10-latin.woff2') format('woff2');
  font-display: block;
}

:root {
  --ink: #1b2a13;
  --lcd: #e1e7b1;
  --lcd-mid: #a0b357;
  --lcd-beat: #d3dba0;
  --lcd-track: #cfd89a;
  --red: #e94c28;
  --white: #fff;
  --bg: #f9f9f9;
  --off: #f2f2f2;
  --line: #ccc;
  --track: #d9d9d9;
  --muted: #939393;
  --key-ink: #1c1c1a;
  --key-sub: #55554f;
  --glow: #e1e7b1; /* ロゴの色と連動(skin.js が書き換える) */
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 18px/10px 'Jersey 10', ui-monospace, monospace;
  -webkit-font-smoothing: none;
  overflow: hidden;
  user-select: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; }
[hidden] { display: none !important; }

/* ===== 画面(1440×830 を窓に合わせて拡大縮小) ===== */
.l-view { position: fixed; inset: 0; }
.l-app { position: absolute; left: 0; top: 0; width: 1440px; height: 830px; transform-origin: 0 0; }

.c-app {
  position: absolute; left: 16px; top: 16px; width: 1408px; height: 798px;
  display: flex; gap: 24px; padding: 24px 20px 50px 24px;
  background: var(--white); border-radius: 4px;
  box-shadow: 2px 2px 32px 3px rgba(0, 0, 0, .16);
  isolation: isolate;
}
/* 白いベースに敷く画像(キャラを2回押したとき)。選んだ画像をそのまま敷く */
.c-app__img { position: absolute; inset: 0; z-index: -1; border-radius: 4px; background: center / cover no-repeat; pointer-events: none; }
/* 画像を敷いているときは、ボタン・キー・液晶などの背景を 90% にして画像を透かす */
.c-app.has-img { --white: rgba(255, 255, 255, .9); --off: rgba(242, 242, 242, .9); --lcd: rgba(225, 231, 177, .9); }
.c-app.has-img .c-key.is-audio { background: rgba(248, 248, 248, .9); }
.c-app.has-img .c-key.is-video { background: rgba(237, 237, 237, .9); }
.c-app.has-img .c-key.is-playing { background: var(--white); }
.c-mascot { position: absolute; left: 1323px; top: 638px; }
.c-icon { display: block; flex: none; }

/* ===== 左列 ===== */
.c-side { width: 158px; flex: none; display: flex; flex-direction: column; }
.c-side__logo { width: 158px; height: 68px; margin-bottom: 30px; }
.c-side__modes { display: flex; flex-direction: column; gap: 6px; }
.c-storage { margin: 12px 0 0; font-size: 14px; line-height: 15px; color: var(--muted); }
.c-storage.is-full { color: var(--red); }
.c-side__transport { position: absolute; top: 474px; left: 24px; display: flex; flex-direction: column; gap: 6px; }
.c-side__kit { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }

.c-tab {
  width: 158px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: var(--off); border: 1px solid var(--line); border-radius: 2px;
}
.c-tab.is-on { background: var(--white); border-color: var(--ink); }

.c-tbtn {
  width: 158px; height: 64px; display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 2px; color: var(--ink);
}
.c-tbtn.is-active { border-color: var(--ink); }
.c-tbtn.is-rec { background: var(--red); border-color: var(--red); }
/* RecOut mode のとき: 左の録音ボタンは「Rec Out ●」(待機 = 赤い文字、録音中 = 赤地に白) */
.c-tbtn.is-out { gap: 12px; color: var(--red); }
.c-tbtn.is-out .c-tbtn__label { font-size: 24px; line-height: 13px; }
.c-tbtn.is-out.is-rec { color: var(--white); }

/* ===== ボタン類 ===== */
.c-btn {
  width: 158px; height: 36px; flex: none; display: flex; align-items: center;
  padding: 0 30px 0 8px; gap: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: 2px; color: var(--ink);
}
.c-btn__icon { width: 22px; display: flex; justify-content: center; }
/* 幅の広いアイコン(ピアノ 31px)は左にそろえる。文字の位置は他のボタンと同じまま(Figma 80:5854) */
.c-btn__icon--piano { justify-content: flex-start; }
.c-btn__label { flex: 1; text-align: center; white-space: nowrap; }
.c-btn--noicon { padding: 0 8px; }
.c-btn--active { border-color: var(--ink); }
.c-btn--danger { border-color: var(--red); color: var(--red); }
.c-btn--lcd { background: var(--lcd); border-color: var(--lcd-mid); }
.c-btn--wide { width: 100%; }
.c-btn:disabled { opacity: .45; cursor: default; }

.c-chip {
  height: 24px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 2px; white-space: nowrap;
}
.c-chip.is-on { border-color: var(--ink); }
.c-chip.is-off { background: var(--off); color: var(--muted); }
.c-chip--lcd { background: var(--lcd); border-color: var(--lcd-mid); }
.c-chips { display: flex; }
.c-chips .c-chip + .c-chip { margin-left: -1px; }
.c-chips .c-chip.is-on { position: relative; }

.c-field {
  height: 24px; width: 60px; padding: 0 8px; border: 1px solid var(--line); border-radius: 2px;
  background: var(--white); outline: none; min-width: 0;
}
.c-field--m { height: 32px; width: 131px; font-size: 24px; }
input.c-field { line-height: normal; }
.c-field--lcd { background: var(--lcd); border-color: var(--lcd-mid); }
.c-field:focus { border-color: var(--ink); }
.c-field::placeholder { color: var(--muted); }
.c-field--lcd::placeholder { color: var(--lcd-mid); }
.c-field[readonly], .c-field:disabled { color: var(--muted); }

/* ===== 中央の列・区切り線 ===== */
.c-main { width: 841px; flex: none; display: flex; flex-direction: column; gap: 30px; }
.c-divider { width: 1px; height: 724px; flex: none; background: var(--line); }

/* ===== 液晶(ステージ) ===== */
.c-stage {
  position: relative; width: 840px; height: 420px; flex: none; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px; padding-top: 10px;
  background: var(--lcd); border-radius: 2px;
}
.c-stage.is-rec { box-shadow: inset 0 0 0 2px var(--red); }
.c-stage__head {
  height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 11px 0 20px;
}
.c-stage__title { display: flex; align-items: center; gap: 24px; min-width: 0; }
.c-stage__name { font-size: 32px; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.c-stage__keyname[contenteditable="true"], .c-keytitle__name[contenteditable="true"] { cursor: text; outline: none; border-radius: 2px; }
.c-stage__keyname[contenteditable="true"]:hover { box-shadow: 0 1px 0 var(--lcd-mid); }
.c-stage__keyname[contenteditable="true"]:focus { box-shadow: 0 1px 0 var(--ink); text-overflow: clip; }
.c-keytitle__name[contenteditable="true"]:hover { box-shadow: 0 1px 0 var(--line); }
.c-stage__actions { display: flex; align-items: center; gap: 8px; }
.c-stage__note { font-size: 18px; }
.c-act { color: var(--lcd-mid); display: flex; }
.c-act.is-on { color: var(--ink); }
.c-act:disabled { cursor: default; }
.c-rec-status { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.c-rec-status__time { font-size: 32px; line-height: 17px; color: var(--red); }
.c-rec-status__sub { font-size: 24px; line-height: 13px; }

.c-tempo { display: flex; align-items: center; gap: 24px; }
.c-tempo__ptn { min-width: 93px; display: flex; align-items: baseline; gap: 8px; font-size: 24px; line-height: 13px; }
.c-tempo__letter { font-size: 48px; line-height: 26px; }
.c-tempo__bpm {
  width: 107px; height: 56px; padding: 0 12px; text-align: center;
  font-size: 56px; line-height: 30px; background: none; color: var(--ink);
  border: 1px solid var(--lcd-mid); border-radius: 4px; outline: none;
}
.c-tempo__bpm:focus { border-color: var(--ink); cursor: text; }
.c-tempo__bpm:not(:focus) { cursor: ns-resize; }

.c-wave { position: relative; flex: none; }
.c-wave canvas { display: block; width: 840px; height: 320px; }
.c-wave--thin canvas { height: 48px; }
.c-axis { display: flex; justify-content: space-between; padding: 0 10px; font-size: 14px; line-height: 15px; flex: none; }

.c-screen { position: relative; background: var(--ink); border-radius: 2px; overflow: hidden; flex: none; }
.c-screen canvas { display: block; width: 100%; height: 100%; }
.c-screen__label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--lcd-mid); pointer-events: none; }
.c-screen__time { position: absolute; left: 12px; bottom: 12px; color: var(--lcd); pointer-events: none; }
.c-stage__video { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: flex-start; }
.c-stage__video .c-screen { width: 490px; height: 276px; }

/* 空のキー: 音 / 動画の2択 */
.c-choices { display: flex; justify-content: center; gap: 24px; padding-top: 16px; }
.c-choice { width: 300px; display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--lcd-mid); border-radius: 4px; align-self: flex-start; }
.c-choice__head { display: flex; align-items: flex-start; gap: 10px; height: 24px; font-size: 32px; line-height: 17px; }
.c-choice__head > span:last-child { margin-top: 2px; }
.c-ibox { width: 22px; height: 20px; flex: none; display: flex; align-items: center; justify-content: center; }
.c-choice .c-btn { width: 100%; }
.c-choice .c-field { width: 100%; }
.c-stage__foot { margin-top: auto; padding: 0 20px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* YouTube */
.c-yt { position: relative; width: 490px; height: 276px; background: #1c1c1a; border-radius: 2px; overflow: hidden; }
.c-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.c-yt__shield { position: absolute; inset: 0; z-index: 1; }
.c-player { height: 48px; flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; }
.c-seek { width: 200px; }

/* 録音中のバー */
.c-progress { height: 4px; background: var(--lcd-track); border-radius: 2px; overflow: hidden; flex: none; }
.c-progress__bar { height: 100%; width: 0; background: var(--red); }

/* PLAY: パターン・ミニグリッド */
.c-patterns { display: flex; gap: 6px; }
.c-pchip { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 24px; line-height: 13px; border: 1px solid var(--lcd-mid); color: var(--lcd-mid); border-radius: 2px; }
.c-pchip.is-filled { border-color: var(--ink); color: var(--ink); }
.c-pchip.is-current { background: var(--ink); border-color: var(--ink); color: var(--lcd); }
.c-pchip.is-next { outline: 1px dashed var(--ink); outline-offset: 1px; }
/* トラック2本(PLAY の液晶見出し) */
.c-tracks { display: flex; flex-direction: column; gap: 4px; }
.c-track { display: flex; gap: 4px; }
.c-track__no { width: 22px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 10px; color: var(--lcd-mid); border-radius: 2px; }
.c-track__no.is-sel { background: var(--ink); color: var(--lcd); }
.c-track__no.is-muted { opacity: .35; }
.c-pchip--s { width: 20px; height: 20px; font-size: 18px; line-height: 10px; }
.c-pchip.is-muted { border: 2px dashed var(--ink); color: var(--ink); }
.c-play-status { display: flex; align-items: center; gap: 8px; font-size: 24px; line-height: 13px; white-space: nowrap; }
.c-play-status.is-rec { color: var(--red); }

.c-seqbody { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 0 20px; }
.c-seqbody .c-screen { width: 352px; height: 198px; }
.c-seqbody.is-wide .c-screen { display: none; }
.c-seq { display: flex; gap: 6px; align-items: flex-start; flex: 1; min-width: 0; }
.c-grid { position: relative; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.c-grid__steps, .c-grid__row { display: flex; align-items: center; gap: 4px; }
.c-grid__steps { padding-left: 72px; font-size: 14px; line-height: 10px; color: var(--lcd-mid); }
.c-grid__steps span { width: 18px; text-align: center; flex: none; }
.c-grid__steps span.is-now { color: var(--ink); }
.c-grid__rows { display: flex; flex-direction: column; gap: 6px; overflow: hidden; height: 258px; }
.c-grid__name {
  width: 60px; height: 18px; flex: none; margin-right: 8px; padding-left: 4px; border-radius: 2px;
  display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 10px; white-space: nowrap; overflow: hidden; text-align: left;
}
.c-grid__name b { font-weight: normal; font-size: 15px; }
.c-grid__name.is-sel { background: var(--ink); color: var(--lcd); }
.c-cell { width: 18px; height: 18px; flex: none; border: 1px solid var(--lcd-mid); border-radius: 1px; }
.c-cell.is-beat { background: var(--lcd-beat); }
.c-cell { --v: 1; cursor: pointer; }
/* 強さ = 下からの塗りの高さ。伸ばした途中のマスは薄いインク */
.c-cell.is-on { border-color: var(--ink); background: linear-gradient(to top, var(--ink) calc(var(--v) * 100%), transparent 0); }
.c-cell.is-tail { border-color: var(--ink); background: linear-gradient(to top, rgba(27, 42, 19, .45) calc(var(--v) * 100%), transparent 0); }
.is-wide .c-cell, .is-wide .c-grid__steps span { width: auto; flex: 1; }
.c-grid__head { position: absolute; top: 0; bottom: 0; width: 20px; background: rgba(27, 42, 19, .12); pointer-events: none; }
.c-scroll { width: 10px; height: 258px; margin-top: 16px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.c-scroll button { color: var(--ink); display: flex; }
.c-scroll button:disabled { color: var(--lcd-mid); cursor: default; }
.c-scroll__track { position: relative; flex: 1; width: 2px; background: rgba(160, 179, 87, .5); border-radius: 1px; }
.c-scroll__thumb { position: absolute; left: 0; right: 0; background: var(--ink); }

/* ===== キーボード ===== */
.c-keyboard { display: flex; flex-direction: column; gap: 6px; width: 841px; }
.c-keyboard__row { display: flex; gap: 6px; }
.c-key {
  position: relative; width: 74px; height: 64px; flex: none; padding: 7px 8px;
  display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  background: var(--white); border: 1px solid var(--line); border-radius: 4px; color: var(--key-sub);
}
.c-key.is-audio { background: #f8f8f8; border-color: #a8a8a2; }
.c-key.is-video { background: #ededed; border-color: #8e8e88; }
.c-key.is-sel { box-shadow: inset 0 0 0 1.5px var(--ink); border-color: var(--ink); }
.c-key.is-rec { box-shadow: inset 0 0 0 1.5px var(--red); border-color: var(--red); }
.c-key.is-over { background: var(--lcd); }
/* 鳴っているキー: ロゴの色(--glow)でまわりを光らせ、縁取り。中は白+内側の影(Figma 73:50717。内側の白い縁は無し) */
.c-key.is-playing { background: var(--white); border-color: transparent; outline: 2.5px solid var(--glow); outline-offset: -1.25px; box-shadow: 0 0 28.6px var(--glow), inset 2px 2px 11.6px rgba(0, 0, 0, .2); z-index: 1; }
.c-key__top { display: flex; justify-content: space-between; align-items: flex-start; }
.c-key__label { font-size: 15px; line-height: 16px; color: var(--key-ink); }
.c-key__badge { font-size: 9px; line-height: 10px; }
.c-key__name { font-size: 10px; line-height: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 右パネル ===== */
.c-insp { width: 289px; flex: none; display: flex; flex-direction: column; justify-content: space-between; padding-top: 10px; min-height: 0; }
.c-insp__body { display: flex; flex-direction: column; gap: 16px; min-height: 0; overflow-y: auto; overflow-x: hidden; margin-right: -12px; padding-right: 12px; scrollbar-width: none; }
.c-insp__body::-webkit-scrollbar { display: none; }
.c-insp__foot { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
.c-insp__foot--tight { gap: 8px; }
.c-rule { height: 1px; background: var(--line); flex: none; }
.c-group { display: flex; flex-direction: column; gap: 16px; }
.c-group--tight { gap: 8px; }
.c-h { font-size: 24px; line-height: 13px; }
.c-h--l { font-size: 32px; line-height: 17px; }
.c-note { margin: 0; font-size: 18px; line-height: 16px; color: var(--muted); }
.c-sub { color: var(--muted); }

.c-ptabs { display: flex; margin-bottom: 8px; }
.c-ptab { flex: 1; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--off); border: 1px solid var(--line); border-radius: 2px; }
.c-ptab.is-on { background: var(--white); border-color: var(--ink); }

.c-keytitle { display: flex; align-items: center; gap: 16px; }
.c-keytitle__key { width: 56px; height: 56px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 56px; line-height: 30px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.c-keytitle.is-rec .c-keytitle__key { background: var(--red); color: var(--white); }
.c-keytitle__name { font-size: 32px; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; outline: none; }
.c-keytitle__name[contenteditable="true"]:focus { box-shadow: 0 1px 0 var(--ink); }

.c-seg { display: flex; }
.c-seg button { width: 80px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--off); border: 1px solid var(--line); border-radius: 2px; }
.c-seg button + button { margin-left: -1px; }
.c-seg button.is-on { background: var(--white); }

.c-range { display: flex; align-items: center; gap: 8px; }
.c-range .c-field { flex: 1; width: auto; }
.c-range__sep { font-size: 24px; color: var(--line); }
.c-nudge { display: flex; align-items: center; gap: 6px; }

.c-sechead { display: flex; align-items: center; gap: 4px; font-size: 24px; line-height: 13px; width: 100%; text-align: left; }
.c-sechead__chev { font-size: 12px; width: 10px; }
.c-params { display: flex; flex-direction: column; gap: 8px; }

.c-param { display: flex; align-items: center; gap: 8px; width: 293px; }
.c-param__label { width: 40px; flex: none; color: var(--muted); white-space: nowrap; overflow: hidden; }
.c-param .c-field { flex: none; }
.c-slider { -webkit-appearance: none; appearance: none; width: 177px; height: 20px; margin: 0; background: transparent; cursor: pointer; }
.c-slider::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: linear-gradient(var(--ink), var(--ink)) 0 / var(--p, 50%) 100% no-repeat, var(--track); }
.c-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 6px; height: 20px; margin-top: -8.5px; background: var(--white); border: 1px solid var(--ink); border-radius: 4px; }
.c-slider::-moz-range-track { height: 3px; border-radius: 4px; background: var(--track); }
.c-slider::-moz-range-progress { height: 3px; border-radius: 4px; background: var(--ink); }
.c-slider::-moz-range-thumb { width: 6px; height: 20px; background: var(--white); border: 1px solid var(--ink); border-radius: 4px; }

.c-opt { display: flex; align-items: center; gap: 8px; }
.c-opt__label { width: 88px; color: var(--muted); }

.c-lib { display: flex; flex-direction: column; }
.c-lib__item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #ededed; width: 100%; text-align: left; }
.c-lib__item:hover { background: #fafaf6; }
.c-lib__name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-lib__len { color: var(--muted); }
.c-lib__del { color: var(--muted); padding: 0 2px; visibility: hidden; }
.c-lib__item:hover .c-lib__del { visibility: visible; }
.c-lib.is-flash .c-lib__item { background: var(--lcd); }

/* ===== メニュー・通知 ===== */
/* 確認ダイアログ: 画面(1440×830)の真ん中。外側は薄く暗くする */
.c-dialog { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; }
/* 幕はアプリの枠の外(画面の余白)まで広げる。枠は拡大縮小されるので、大きくはみ出させて画面全体を覆う。幕のクリックも .c-dialog のクリックになる */
.c-dialog::before, .c-guide::before { content: ''; position: absolute; inset: -10000px; z-index: -1; background: rgba(27, 42, 19, .16); }
.c-dialog__box { width: 400px; display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--white); border: 1px solid var(--ink); border-radius: 4px; box-shadow: 2px 2px 32px 3px rgba(0, 0, 0, .16); }
.c-dialog__box .c-note { margin-top: -4px; }
.c-dialog__btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.c-dialog__btns .c-btn { width: 120px; }
.c-menu { position: fixed; z-index: 20; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--white); border: 1px solid var(--ink); border-radius: 2px; box-shadow: 2px 2px 12px rgba(0, 0, 0, .15); }
.c-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 110; transform: translate(-50%, 20px); opacity: 0; /* 全画面(100)の上にも出す */
  padding: 12px 16px; background: var(--ink); color: var(--lcd); border-radius: 2px; line-height: 16px;
  font-family: system-ui, 'Hiragino Sans', 'Noto Sans JP', sans-serif; font-size: 14px; transition: opacity .2s, transform .2s; pointer-events: none; max-width: 80vw;
}
.c-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.c-ghost { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; padding: 6px 10px; background: var(--ink); color: var(--lcd); border-radius: 2px; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }

/* ===== シンセ ===== */
/* 鍵盤: 鳴らないキーは薄く。M の右にオクターブ切り替え */
.c-key.is-dim { opacity: .35; }
.c-keyboard { position: relative; }
.c-octave { position: absolute; left: 694px; top: 225px; display: flex; align-items: center; gap: 8px; }
.c-octave__key { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--white); border: 1px solid var(--ink); border-radius: 4px; }
.c-octave__txt { display: flex; flex-direction: column; gap: 4px; margin-left: 4px; }
.c-octave__range { font-size: 14px; color: var(--muted); }
/* 液晶の左: 音の形 */
.c-scope { width: 352px; height: 198px; }
.c-scope__tone, .c-scope__note, .c-scope__oct { position: absolute; pointer-events: none; }
.c-scope__tone { left: 16px; top: 18px; font-size: 22px; line-height: 12px; color: var(--lcd-mid); }
.c-scope__note { right: 16px; top: 18px; font-size: 22px; line-height: 12px; color: #e1e7b1; }
.c-scope__oct { left: 16px; bottom: 18px; color: #e1e7b1; white-space: pre; }
/* 液晶の右: 打ち込み */
.c-roll { flex: 1; min-width: 0; height: 275px; }
.c-roll canvas { display: block; width: 100%; height: 100%; cursor: pointer; }
/* 右パネル */
.c-chips--fill .c-chip { flex: 1; padding: 0; }
.c-opt--s .c-opt__label { width: 44px; flex: none; }
.c-opt--s .c-chips { flex: 1; }
.c-opt--s .c-chip { flex: 1; padding: 0; }
.c-sechead__auto { margin: -4px 0 -4px auto; height: 20px; font-size: 16px; padding: 0 6px; }
.c-waveed { display: block; width: 289px; height: 80px; background: var(--lcd); border-radius: 2px; cursor: crosshair; touch-action: none; }
/* サンプラー画面の液晶: TRACK 3(シンセ)のピアノのアイコン + パターン */
.c-synthtrk { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--ink); border-radius: 3px; }
.c-synthtrk__icon { display: flex; color: var(--ink); }
.c-synthtrk.is-muted { opacity: .45; border-style: dashed; }

/* 液晶の RecOut mode ボタン: オンでインク地・液晶色の文字(録音中は枠もインク) */
.c-btn--recout.is-on { background: var(--ink); color: var(--lcd); border-width: 1.5px; }
.c-btn--recout.is-on:disabled { opacity: 1; border-color: var(--ink); cursor: default; }
/* Rec Tab Video: 液晶のライブ映像(範囲を選ぶ)・初回の確認 */
.c-tabv canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.c-chip--lcd.is-ink { background: var(--ink); border-color: var(--ink); color: var(--lcd); }
.c-dialog__box--wide { width: 440px; }
.c-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.c-check input { width: 14px; height: 14px; margin: 0; accent-color: var(--ink); }
/* 上下ドラッグで変えられる数値の欄(Start / End) */
.c-field--drag:not(:focus):not(:disabled) { cursor: ns-resize; }

/* キーのミュート / ソロ(鳴り方の3つのボタンの右) */
.c-segrow { display: flex; gap: 8px; }
.c-segrow .c-seg:first-child button { width: 64px; }
.c-seg--ms button { width: 40px; font-size: 18px; }
.c-seg--ms button.is-on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.c-key.is-silent { opacity: .45; }
/* はじめての起動の注意(Figma 109:11932)。赤は Figma の #E9282B */
.c-notice__box { width: 900px; display: flex; flex-direction: column; gap: 20px; padding: 28px 32px; background: var(--white); border: 1px solid var(--ink); border-radius: 4px; box-shadow: 2px 2px 32px 3px rgba(0, 0, 0, .16); }
.c-notice__title { font-size: 60px; line-height: 64px; color: #e9282b; }
.c-notice__items { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; background: #fceded; border: 2px solid #e9282b; border-radius: 4px; }
.c-notice__item, .c-notice__note, .c-notice__agree { font-family: 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.c-notice__item { margin: 0; font-size: 28px; line-height: 1.4; font-weight: 700; color: #e9282b; }
.c-notice__note { margin: 0; font-size: 14px; line-height: 22px; color: #737373; }
.c-notice__actions { display: flex; align-items: center; justify-content: space-between; }
.c-notice__agree { font-size: 15px; line-height: 18px; font-weight: 700; color: var(--ink); }
.c-notice__agree input { width: 16px; height: 16px; }
.c-notice__btns { display: flex; gap: 8px; }
.c-notice.is-ja .c-notice__btns .c-btn { font-family: 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif; font-size: 16px; -webkit-font-smoothing: antialiased; }

/* ===== クイックガイド(? ボタン: Figma 119:3067 / hover 115:13621) ===== */
.c-help { position: absolute; left: 222px; top: 734px; z-index: 5; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; padding: 0; font-size: 18px; line-height: 1; color: var(--line); background: var(--white); border: 1px solid var(--line); border-radius: 50%; }
.c-help:hover, .c-help:focus-visible { color: var(--ink); }
.c-guide { position: absolute; inset: 0; z-index: 40; cursor: pointer; }
.c-guide::before { background: rgba(0, 0, 0, .55); }
.c-guide__img { position: absolute; left: 120px; top: 15px; width: 1200px; height: 800px; border-radius: 4px; }
.c-guide__manual { position: absolute; right: 150px; top: 38px; padding: 6px 12px; font-size: 18px; line-height: 1; color: var(--lcd); text-decoration: none; border: 1px solid var(--lcd); border-radius: 4px; }
.c-guide__manual:hover { color: var(--ink); background: var(--lcd); }
.c-guide__close { position: absolute; right: 120px; top: 790px; margin: 0; font-size: 20px; color: var(--white); }

/* ===== 対応ブラウザの表記(グレーの背景の下・白いベースの外、左端をベースに揃える。Figma 122:13001) ===== */
.c-browsers { position: absolute; left: 16px; right: 16px; top: 814px; height: 16px; margin: 0; display: flex; align-items: center; justify-content: flex-start; font-size: 11px; line-height: 1; color: var(--muted); pointer-events: none; }
.c-browsers.is-ja { font-family: 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif; font-size: 8px; -webkit-font-smoothing: antialiased; }

/* ===== PC 以外で開いたとき ===== */
.c-pconly { position: fixed; inset: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px 28px; text-align: center; background: var(--bg); user-select: text; }
.c-pconly__logo { width: 190px; height: auto; }
.c-pconly__title { margin: 0; font-size: 26px; line-height: 1.1; color: var(--ink); }
.c-pconly__text { margin: 0; max-width: 340px; font-size: 20px; line-height: 1.3; color: var(--ink); }
.c-pconly.is-ja .c-pconly__text { font-family: 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif; font-size: 15px; line-height: 1.7; font-weight: 700; -webkit-font-smoothing: antialiased; }
.c-pconly__url { margin: 0; padding: 8px 12px; font-size: 18px; line-height: 1; color: var(--ink); background: var(--lcd); border-radius: 4px; word-break: break-all; }
.c-pconly__manual { font-size: 18px; line-height: 1; color: var(--ink); }
.c-pconly__mascot { width: 58px; height: auto; margin-top: 6px; }

/* ===== モニターの全画面(Figma 126:12358 / 126:13339) ===== */
/* アイコンだけ(Figma 124:14957)。押せる範囲は 28px、アイコンはモニターの右下から 8px 内側 */
.c-screen__full { position: absolute; right: 1px; bottom: 1px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--lcd); }
.c-full { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: var(--ink); }
.c-full__screen { position: relative; width: min(100vw, calc(100vh * 16 / 9)); aspect-ratio: 16 / 9; }
.c-full__screen canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.c-full__screen .c-screen__label { font-size: 72px; }
.c-full__screen .c-screen__time { left: 32px; bottom: 28px; font-size: 48px; }
.c-full__hint { position: absolute; right: 24px; top: 20px; margin: 0; font-size: 20px; line-height: 1; color: var(--lcd); opacity: .6; }
/* アイコンだけ(Figma 126:13345)。押せる範囲は 36px、アイコンは右から 24px・下から 20px */
.c-full__exit { position: absolute; right: 15px; bottom: 11px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--lcd); }
.c-full__hint, .c-full__exit { transition: opacity .3s; }
.c-full.is-idle { cursor: none; }
.c-full.is-idle .c-full__hint, .c-full.is-idle .c-full__exit { opacity: 0; pointer-events: none; }

/* ===== 波形の拡大縮小(Figma 126:13356 / 126:13724) ===== */
.c-axis { position: relative; cursor: grab; touch-action: none; }
.c-axis.is-drag { cursor: grabbing; }
.c-axis__ov { position: absolute; left: 0; right: 0; top: -6px; height: 3px; background: rgba(160, 179, 87, .5); pointer-events: none; }
.c-axis__win { position: absolute; top: 0; bottom: 0; background: var(--ink); }
.c-axis__hint { position: absolute; right: 12px; bottom: calc(100% + 12px); z-index: 2; display: none; align-items: center; gap: 6px; padding: 6px 10px; font-size: 16px; line-height: 1; color: var(--lcd); background: var(--ink); border-radius: 4px; white-space: pre; pointer-events: none; }
.c-axis:hover .c-axis__hint { display: flex; }
.c-axis.is-drag .c-axis__hint { display: none; }
.c-zoomlabel { position: absolute; right: 268px; top: 33px; font-size: 18px; line-height: 1; color: var(--ink); pointer-events: none; }
