/* 16ステップ — タップで打ち込むリズムマシン
   トークン：マット黒の筐体 × 橙のゴムパッド × 白のシルク印刷 × 琥珀色のドット液晶 */
:root {
  --body: #121212;
  --panel: #1B1B1B;
  --panel-2: #222222;
  --groove: #0A0A0A;
  --rubber: #2B2B2B;
  --rubber-2: #333333;
  --silk: #F2F0EA;
  --silk-2: #ABA79E;
  --orange: #FF7A1A;
  --orange-hi: #FFB066;
  --orange-deep: #D85A00;
  --ink-on-orange: #1A0D02;
  --lcd: #1C1006;
  --lcd-ink: #FF9A3C;
  --lcd-dim: #6E4520;
  --red: #FF3B2F;
  --green: #7CFF6B;

  --ja: "M PLUS 1", "Hiragino Sans", "Yu Gothic", sans-serif;
  --silkf: "Barlow Condensed", "M PLUS 1", sans-serif;
  --dot: "DotGothic16", "M PLUS 1", monospace;

  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --press: cubic-bezier(.3, 0, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--body); color: var(--silk); font: 400 15px/1.6 var(--ja); line-break: strict; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
h1, h2, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; user-select: text; -webkit-user-select: text; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--orange-hi); outline-offset: 2px; }
.silk { font-family: var(--silkf); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--silk); font-size: 13px; line-height: 1.1; white-space: nowrap; }
.noscript, .boot { padding: 32px 20px; text-align: center; color: var(--silk-2); }
.boot__t { font: 800 24px/1.4 var(--ja); color: var(--silk); }

/* ---------- 筐体 ---------- */
.rig { position: relative; height: 100vh; height: 100dvh; max-width: 430px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden; background: var(--body); background-image: radial-gradient(120% 60% at 50% 0%, #1E1E1E 0%, var(--body) 60%); }
@media (min-width: 600px) {
  body { background: #070707 radial-gradient(800px 500px at 50% 30%, #2A1606 0%, #070707 70%); }
  .rig { box-shadow: 0 0 0 1px #2C2C2C, 0 40px 90px rgba(0, 0, 0, .7); border-radius: 0; }
}
.rig__top { flex: none; display: flex; align-items: center; justify-content: space-between; height: calc(50px + var(--st)); padding: var(--st) 8px 0 16px; }
.brand { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.brand__led { width: 8px; height: 8px; border-radius: 50%; background: #4A1410; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6); align-self: center; }
.brand__led.blink { animation: led .14s steps(1) both; }
@keyframes led { 0% { background: var(--red); box-shadow: 0 0 8px var(--red); } 100% { background: var(--red); box-shadow: 0 0 8px var(--red); } }
.rig:not(.is-playing) .brand__led { animation: none; }
.brand__name { font: 700 24px/1 var(--silkf); letter-spacing: .08em; color: var(--silk); font-style: italic; }
.brand__sub { font: 600 11px/1 var(--silkf); letter-spacing: .16em; color: var(--silk-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hwbtn--icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.hwbtn--icon svg { width: 22px; height: 22px; fill: none; stroke: var(--silk); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hwbtn--icon .x { display: none; }
.rig.is-muted .hwbtn--icon .w1, .rig.is-muted .hwbtn--icon .w2 { display: none; }
.rig.is-muted .hwbtn--icon .x { display: inline; stroke: var(--orange); }

/* LCD */
.lcd { position: relative; flex: none; margin: 0 12px; padding: 8px 12px 9px; border-radius: 10px; background: var(--lcd); border: 2px solid #050505; box-shadow: inset 0 2px 10px rgba(0, 0, 0, .8), 0 1px 0 #2a2a2a; font-family: var(--dot); color: var(--lcd-ink); overflow: hidden; }
.lcd::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px); }
.lcd__row { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.3; white-space: nowrap; }
.lcd__ptn { flex: none; }
.lcd__msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.lcd__state { flex: none; }
.lcd__row--big { align-items: baseline; margin: 2px 0 4px; }
.lcd__k { font-size: 14px; }
.lcd__bpm { font-size: 40px; line-height: 1; letter-spacing: .04em; text-shadow: 0 0 10px rgba(255, 154, 60, .35); }
.lcd__sw { margin-left: auto; font-size: 14px; }
.lcd__steps { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.lcd__steps i { height: 6px; background: #3A220E; border-radius: 1px; }
.lcd__steps i.beat { background: #4F2F12; }
.lcd__steps i.now { background: var(--lcd-ink); box-shadow: 0 0 6px var(--lcd-ink); }

/* トランスポート */
.transport { flex: none; display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; align-items: center; gap: 8px; padding: 10px 12px 8px; }
.play { height: 60px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; background: linear-gradient(180deg, #FF8E3A, var(--orange) 45%, var(--orange-deep)); color: var(--ink-on-orange); box-shadow: 0 4px 0 #6B2C00, 0 6px 14px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .06s var(--press), box-shadow .06s var(--press); }
.play:active { transform: translateY(3px); box-shadow: 0 1px 0 #6B2C00, 0 2px 6px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .25); }
.play__i { width: 24px; height: 24px; fill: currentColor; }
.play__i--stop { display: none; }
.rig.is-playing .play__i--play { display: none; }
.rig.is-playing .play__i--stop { display: block; }
.play__l { font: 700 13px/1 var(--silkf); letter-spacing: .16em; }
.rig.is-playing .play { background: linear-gradient(180deg, #FFC08A, var(--orange-hi) 45%, var(--orange)); box-shadow: 0 4px 0 #6B2C00, 0 0 22px rgba(255, 122, 26, .55), inset 0 1px 0 rgba(255, 255, 255, .4); }
.hwbtn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; padding: 0 14px; border-radius: 10px; background: linear-gradient(180deg, #2E2E2E, #232323); box-shadow: 0 3px 0 #0B0B0B, inset 0 1px 0 rgba(255, 255, 255, .08); color: var(--silk); transition: transform .06s var(--press), box-shadow .06s var(--press); }
.hwbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #0B0B0B, inset 0 1px 0 rgba(255, 255, 255, .05); }
.hwbtn__ja { font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.hwbtn--tap { height: 60px; padding: 0 6px; }
.hwbtn--tap .hwbtn__ja { font-size: 11px; color: var(--silk-2); font-weight: 500; }
.knob { display: flex; flex-direction: column; align-items: center; gap: 5px; touch-action: none; cursor: ns-resize; }
.knob__cap { position: relative; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #4A4A4A, #262626 60%, #171717); box-shadow: 0 0 0 3px #0C0C0C, 0 0 0 4px #2A2A2A, 0 4px 8px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .15); transition: transform .05s linear; }
.knob__cap i { position: absolute; left: 50%; top: 4px; width: 3px; height: 14px; margin-left: -1.5px; border-radius: 2px; background: var(--orange); box-shadow: 0 0 4px rgba(255, 122, 26, .6); }
.knob.is-turn .knob__cap { box-shadow: 0 0 0 3px #0C0C0C, 0 0 0 4px var(--orange), 0 4px 8px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .15); }
.knob .silk { font-size: 11px; color: var(--silk-2); }
.knob--s .knob__cap { width: 52px; height: 52px; }
.knob--xs .knob__cap { width: 40px; height: 40px; }
.knob--xs .knob__cap i { height: 11px; }

/* デッキ（タブの中身） */
.deck { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 4px 12px 20px; scrollbar-width: none; border-top: 1px solid #0A0A0A; box-shadow: inset 0 1px 0 #262626; }
.deck::-webkit-scrollbar { display: none; }
.deck.swap { animation: swap .22s var(--press); }
@keyframes swap { from { opacity: .2; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 機能ボタン（タブ） */
.fn { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 12px calc(8px + var(--sb)); background: var(--groove); border-top: 1px solid #262626; }
.fn a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; border-radius: 10px; background: linear-gradient(180deg, #262626, #1D1D1D); box-shadow: 0 2px 0 #000, inset 0 1px 0 rgba(255, 255, 255, .06); transition: transform .06s var(--press); }
.fn a:active { transform: translateY(2px); }
.fn__led { width: 18px; height: 3px; border-radius: 2px; background: #3A2A1C; }
.fn a.on .fn__led { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.fn .silk { font-size: 12px; }
.fn__ja { font-size: 11px; color: var(--silk-2); line-height: 1.2; }
.fn a.on .fn__ja { color: var(--silk); }

/* ---------- シーケンサー ---------- */
.voices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 8px; }
.voice { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 1px; min-height: 50px; padding: 6px 8px; border-radius: 8px; background: linear-gradient(180deg, #2A2A2A, #202020); box-shadow: 0 2px 0 #050505, inset 0 1px 0 rgba(255, 255, 255, .06); text-align: left; transition: transform .06s var(--press); }
.voice:active { transform: translateY(2px); }
.voice .silk { font-size: 13px; }
.voice__ja { font-size: 11px; color: var(--silk-2); line-height: 1.2; }
.voice__led { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: #3A2412; }
.voice[aria-pressed="true"] { background: linear-gradient(180deg, #3A2614, #2A1B0E); box-shadow: 0 2px 0 #050505, inset 0 0 0 1.5px var(--orange); }
.voice[aria-pressed="true"] .voice__led { background: var(--orange); box-shadow: 0 0 6px var(--orange); }
.voice[aria-pressed="true"] .voice__ja { color: var(--silk); }
.voice.hit .voice__led { animation: hit .16s ease-out; }
@keyframes hit { 0% { background: #FFE2C4; box-shadow: 0 0 10px var(--orange-hi); } 100% { } }
.matrix { display: flex; flex-direction: column; gap: 3px; padding: 7px 8px; margin-bottom: 8px; border-radius: 8px; background: var(--groove); box-shadow: inset 0 1px 4px rgba(0, 0, 0, .9); }
.mrow { display: flex; align-items: center; cursor: pointer; border-radius: 3px; }
.mrow__n { display: none; }
.mrow__c { flex: 1; display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; }
.mrow__c i { height: 9px; border-radius: 2px; background: #1E1E1E; }
.mrow__c i:nth-child(4n+1) { background: #262626; }
.mrow__c i.m1 { background: #A84E10; }
.mrow__c i.m2 { background: var(--orange); }
.mrow.sel .mrow__c i { box-shadow: 0 0 0 1px rgba(255, 176, 102, .35); }
.mrow.sel .mrow__c i.m1 { background: var(--orange); }
.mrow.sel .mrow__c i.m2 { background: #FFD2A6; }
.mrow__c i.now { outline: 1px solid var(--silk); }
.padhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 8px; }
.padhead p { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.padhead__v { font-size: 17px; font-weight: 800; }
.padhead__p { font-size: 12px; color: var(--silk-2); }
.padhead__acts { display: flex; gap: 6px; }
.mini { min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--silk); background: var(--panel-2); box-shadow: 0 2px 0 #050505; white-space: nowrap; }
.mini:active { transform: translateY(2px); box-shadow: none; }
.pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pad { position: relative; height: 60px; border-radius: 10px; background: linear-gradient(180deg, #343434, var(--rubber)); box-shadow: 0 4px 0 #080808, 0 5px 10px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .09); transition: transform .05s var(--press), box-shadow .05s var(--press), background .08s; touch-action: manipulation; }
.pad.g1 { background: linear-gradient(180deg, #3C3C3C, var(--rubber-2)); }
.pad.down { transform: translateY(3px); box-shadow: 0 1px 0 #080808, 0 2px 4px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .05); }
.pad__n { position: absolute; left: 9px; top: 6px; font: 700 13px/1 var(--silkf); color: var(--silk-2); letter-spacing: .06em; }
.pad__led { position: absolute; left: 50%; bottom: 8px; width: 16px; height: 4px; margin-left: -8px; border-radius: 2px; background: #151515; }
.pad.on { background: linear-gradient(180deg, #FF9442, var(--orange) 55%, #E86400); box-shadow: 0 4px 0 #6B2C00, 0 0 16px rgba(255, 122, 26, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
.pad.on .pad__n, .pad.acc .pad__n { color: var(--ink-on-orange); }
.pad.on .pad__led { background: #8A3A00; }
.pad.acc { background: linear-gradient(180deg, #FFD3A8, var(--orange-hi) 50%, var(--orange)); box-shadow: 0 4px 0 #6B2C00, 0 0 24px rgba(255, 150, 60, .6), inset 0 1px 0 rgba(255, 255, 255, .55); }
.pad.acc .pad__led { background: #fff; box-shadow: 0 0 6px #fff; }
.pad.acc::after { content: "ACC"; position: absolute; right: 8px; top: 6px; font: 700 11px/1 var(--silkf); letter-spacing: .1em; color: var(--ink-on-orange); }
.pad.down.on, .pad.down.acc { box-shadow: 0 1px 0 #6B2C00, inset 0 1px 0 rgba(255, 255, 255, .3); }
.pad.now .pad__led { background: var(--silk); box-shadow: 0 0 8px var(--silk); }
.pad.now { filter: brightness(1.25); }
.pad.now::before { content: ""; position: absolute; inset: -3px; border-radius: 12px; box-shadow: 0 0 0 2px rgba(242, 240, 234, .85); pointer-events: none; }
.hint { margin: 12px 4px 4px; font-size: 13px; color: var(--silk-2); text-align: center; word-break: keep-all; }

/* ---------- パターン ---------- */
.ptns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px; }
.ptn { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: linear-gradient(180deg, #282828, #1E1E1E); box-shadow: 0 3px 0 #050505, inset 0 1px 0 rgba(255, 255, 255, .06); text-align: left; transition: transform .06s var(--press); }
.ptn:active { transform: translateY(2px); }
.ptn[aria-pressed="true"] { box-shadow: 0 3px 0 #050505, inset 0 0 0 2px var(--orange); background: linear-gradient(180deg, #33200F, #24170B); }
.ptn__top { display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.ptn__l { font: 700 32px/1 var(--silkf); color: var(--silk); }
.ptn[aria-pressed="true"] .ptn__l { color: var(--orange-hi); }
.ptn__st { font-size: 12px; font-weight: 700; color: var(--silk-2); }
.ptn__st.play { color: var(--ink-on-orange); background: var(--orange); padding: 1px 8px; border-radius: 4px; }
.ptn__st.next { color: var(--lcd-ink); animation: nextblink 1s steps(2) infinite; }
@keyframes nextblink { 50% { opacity: .45; } }
.mini-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 1.5px; padding: 6px; border-radius: 6px; background: var(--groove); }
.mini-grid i { height: 5px; border-radius: 1px; background: #1F1F1F; }
.mini-grid i.m1 { background: #B85614; }
.mini-grid i.m2 { background: var(--orange-hi); }
.ptnacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.ptnacts .hwbtn { min-height: 52px; }
.chain { padding: 14px; border-radius: 12px; background: var(--panel); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.chain__h { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.chain__t { font-size: 16px; font-weight: 800; }
.chain__d { font-size: 13px; color: var(--silk-2); margin-top: 2px; }
.switch { position: relative; flex: none; width: 56px; height: 32px; border-radius: 16px; background: #2E2E2E; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8); transition: background-color .15s; }
.switch i { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #8F8B83; transition: transform .2s cubic-bezier(.3, 1.4, .5, 1), background-color .15s; }
.switch[aria-checked="true"] { background: #6B3410; }
.switch[aria-checked="true"] i { transform: translateX(24px); background: var(--orange); box-shadow: 0 0 10px var(--orange); }
.switch--lab { display: flex; align-items: center; width: auto; height: 44px; padding: 0 12px 0 64px; border-radius: 22px; }
.switch--lab i { top: 10px; left: 6px; }
.switch--lab::before { content: ""; position: absolute; left: 2px; top: 6px; width: 56px; height: 32px; border-radius: 16px; }
.switch--lab[aria-checked="true"] i { transform: translateX(26px); }
.switch--lab span { font-size: 13px; font-weight: 700; color: var(--silk); }
.slots { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin: 14px 0 10px; }
.slot { height: 44px; border-radius: 6px; background: var(--groove); display: grid; place-items: stretch; }
.slot.empty { place-items: center; color: #9A968E; font-size: 13px; }
.slot button { font: 700 20px/1 var(--silkf); color: var(--silk); border-radius: 6px; background: #2A2A2A; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.slot.now button { background: var(--orange); color: var(--ink-on-orange); }
.chain__add { display: flex; gap: 6px; }
.addp { flex: 1; min-height: 44px; border-radius: 8px; background: #2A2A2A; box-shadow: 0 2px 0 #050505; font: 700 16px/1 var(--silkf); letter-spacing: .06em; color: var(--silk); }
.addp:active { transform: translateY(2px); box-shadow: none; }
.addp:disabled { opacity: .4; }
.addp--x { flex: 1.4; font: 700 13px/1 var(--ja); }
.copyto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.ptn--s { padding: 8px; }
.ptn--s .ptn__l { font-size: 26px; }

/* ---------- ミキサー ---------- */
.master { display: flex; align-items: center; gap: 12px; padding: 12px; margin: 8px 0 12px; border-radius: 12px; background: var(--panel); }
.master__m { flex: 1; min-width: 0; }
.master__m .silk { font-size: 11px; color: var(--silk-2); margin-bottom: 6px; }
.hmeter { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; }
.hmeter i { height: 10px; border-radius: 1px; background: #1F2A1C; }
.hmeter i.y { background: #2E2A14; } .hmeter i.r { background: #2E1512; }
.hmeter i.lit { background: var(--green); } .hmeter i.y.lit { background: #FFD23F; } .hmeter i.r.lit { background: var(--red); }
.strips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.strip { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 4px 8px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.strip.silent { opacity: .55; }
.strip__n { font-size: 12px; }
.strip__body { display: flex; gap: 6px; height: 132px; }
.vmeter { display: flex; flex-direction: column; gap: 2px; width: 7px; }
.vmeter i { flex: 1; border-radius: 1px; background: #1F2A1C; }
.vmeter i.y { background: #2E2A14; } .vmeter i.r { background: #2E1512; }
.vmeter i.lit { background: var(--green); } .vmeter i.y.lit { background: #FFD23F; } .vmeter i.r.lit { background: var(--red); }
.fader { position: relative; width: 40px; height: 100%; touch-action: none; cursor: ns-resize; }
.fader__track { position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; border-radius: 2px; background: #050505; box-shadow: 0 0 0 1px #2A2A2A; }
.fader__cap { position: absolute; left: 3px; right: 3px; height: 26px; border-radius: 4px; background: linear-gradient(180deg, #5A5A5A, #2C2C2C 45%, #3A3A3A 55%, #222); box-shadow: 0 3px 6px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .2); }
.fader__cap::after { content: ""; position: absolute; left: 4px; right: 4px; top: 12px; height: 2px; background: var(--silk); }
.ms { display: flex; gap: 4px; }
.msb { width: 34px; height: 44px; border-radius: 6px; background: #2A2A2A; box-shadow: 0 2px 0 #050505; font: 700 15px/1 var(--silkf); color: var(--silk-2); }
.msb:active { transform: translateY(2px); box-shadow: none; }
.msb--m[aria-pressed="true"] { background: #FFD23F; color: #1A1400; }
.msb--s[aria-pressed="true"] { background: var(--orange); color: var(--ink-on-orange); }
.strip__ja { font-size: 11px; color: var(--silk-2); line-height: 1.2; }

/* ---------- 保存 ---------- */
.proj { padding: 14px; margin: 8px 0 18px; border-radius: 12px; background: var(--lcd); border: 2px solid #050505; box-shadow: inset 0 2px 10px rgba(0, 0, 0, .8); }
.proj__l { display: block; font-size: 11px; color: var(--lcd-ink); margin-bottom: 6px; }
.proj__name { width: 100%; height: 46px; padding: 0 10px; border-radius: 6px; border: 1px solid #4A2E14; background: #120A03; color: var(--lcd-ink); font: 400 20px/1 var(--dot); outline: none; }
.proj__name:focus { border-color: var(--lcd-ink); }
.proj__meta { margin: 8px 0 12px; font: 400 13px/1.5 var(--dot); color: var(--lcd-ink); }
.proj__acts { display: flex; gap: 8px; }
.proj__acts > * { flex: 1; }
.obtn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 10px; background: linear-gradient(180deg, #FF8E3A, var(--orange) 50%, var(--orange-deep)); color: var(--ink-on-orange); font-weight: 800; font-size: 15px; box-shadow: 0 3px 0 #6B2C00, inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .06s var(--press), box-shadow .06s var(--press); white-space: nowrap; }
.obtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #6B2C00; }
.obtn--wide { width: 100%; }
.sec { margin-bottom: 20px; }
.sec__t { display: flex; align-items: baseline; gap: 10px; font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.sec__t .silk { font-size: 12px; color: var(--orange-hi); }
.saves { display: flex; flex-direction: column; gap: 6px; }
.save { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--panel); }
.save.cur { box-shadow: inset 3px 0 0 var(--orange); }
.save__b { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.save__b b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save__b span { font-size: 12px; color: var(--silk-2); }
.hwbtn--s { min-height: 44px; padding: 0 12px; }
.hwbtn--del .hwbtn__ja { color: #FF9B8F; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: var(--panel); text-align: left; transition: transform .1s var(--press); }
.preset:active { transform: scale(.97); }
.preset img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.preset__b { display: flex; flex-direction: column; padding: 8px; line-height: 1.35; }
.preset__b b { font-size: 13px; word-break: keep-all; }
.preset__b span { font: 600 12px/1.3 var(--silkf); letter-spacing: .08em; color: var(--silk-2); margin-top: 2px; }
.sec--links { border-radius: 12px; background: var(--panel); overflow: hidden; }
.linkrow { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 0 12px 0 16px; font-weight: 700; text-align: left; }
.linkrow + .linkrow { border-top: 1px solid #2A2A2A; }
.linkrow svg { width: 20px; height: 20px; fill: none; stroke: var(--silk-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.linkrow:active { background: #262626; }
.linkrow--warn span { color: #FF9B8F; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 16px 4px; }
.empty img { width: 160px; height: 160px; object-fit: cover; border-radius: 14px; margin-bottom: 12px; }
.empty__t { font-weight: 800; word-break: keep-all; }
.empty__d { font-size: 14px; color: var(--silk-2); word-break: keep-all; }
.about { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 4px 12px; }
.hwbtn--back { align-self: flex-start; margin-bottom: 12px; }
.about img { width: 104px; height: 104px; border-radius: 24px; box-shadow: 0 10px 30px rgba(255, 122, 26, .25); margin-bottom: 12px; }
.about__n { font-size: 22px; font-weight: 800; }
.about__v { font-size: 12px; color: var(--silk-2); margin: 4px 0 10px; }
.about__l { font-size: 14px; color: var(--silk-2); word-break: keep-all; margin-bottom: 16px; }
.about__box { width: 100%; padding: 14px; margin-bottom: 18px; border-radius: 12px; background: var(--panel); text-align: left; }
.about__box p { font-size: 14px; color: var(--silk); margin-bottom: 10px; }
.about .sec__t { align-self: flex-start; }
.techs { text-align: left; align-self: stretch; }
.techs li { position: relative; padding-left: 16px; font-size: 14px; color: var(--silk-2); margin-bottom: 6px; }
.techs li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 4px; border-radius: 1px; background: var(--orange); }

/* ---------- シート・トースト ---------- */
.sheet-layer { position: absolute; inset: 0; z-index: 30; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .2s; }
.sheet-layer.on .sheet-scrim { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 16px calc(18px + var(--sb)); border-radius: 18px 18px 0 0; background: var(--panel); box-shadow: 0 -1px 0 #333; transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .9, .3, 1); }
.sheet-layer.on .sheet { transform: none; }
.sheet__grip { height: 20px; display: grid; place-items: center; }
.sheet__grip::before { content: ""; width: 34px; height: 4px; border-radius: 2px; background: #444; }
.sheet__t { font-size: 18px; font-weight: 800; margin: 4px 0 8px; word-break: keep-all; }
.sheet__d { font-size: 14px; color: var(--silk-2); margin-bottom: 16px; word-break: keep-all; }
.sheet__acts { display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: absolute; left: 12px; right: 12px; bottom: calc(84px + var(--sb)); z-index: 35; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 6px 6px 14px; border-radius: 10px; background: var(--silk); color: #121212; font-size: 14px; font-weight: 500; line-height: 1.45; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .18s, transform .25s cubic-bezier(.3, 1.3, .5, 1); word-break: keep-all; }
.toast.on { opacity: 1; transform: none; pointer-events: auto; }
.toast span { flex: 1; }
.toast button { min-height: 40px; padding: 0 12px; border-radius: 8px; background: #121212; color: var(--orange-hi); font-weight: 800; white-space: nowrap; }

/* ---------- スプラッシュ・オンボーディング ---------- */
.splash { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--body); transition: opacity .3s; }
.splash img { width: 120px; height: 120px; border-radius: 28px; box-shadow: 0 0 60px rgba(255, 122, 26, .35); }
.splash__n { font: 700 34px/1 var(--silkf); font-style: italic; letter-spacing: .1em; }
.splash__s { font-size: 14px; color: var(--silk-2); }
.splash.out { opacity: 0; }
.rig.is-welcome > :not(.welcome):not(.splash):not(.toast) { visibility: hidden; }
.welcome { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--body); }
.welcome__track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.welcome__track::-webkit-scrollbar { display: none; }
.wslide { flex: 0 0 100%; scroll-snap-align: start; display: flex; align-items: flex-start; padding: calc(40px + var(--st)) 16px 0; background-size: cover; background-position: center bottom; }
.wslide__panel { padding: 16px 18px 18px; border-radius: 14px; background: var(--body); box-shadow: inset 0 0 0 1px #2A2A2A; }
.wslide__n { font-size: 12px; color: var(--orange-hi); }
.wslide__t { font-size: 26px; font-weight: 800; line-height: 1.4; margin: 8px 0; word-break: keep-all; }
.wslide__d { font-size: 15px; color: var(--silk-2); }
.welcome__bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px calc(16px + var(--sb)); background: var(--body); }
.wdots { display: flex; gap: 6px; }
.wdots i { width: 8px; height: 8px; border-radius: 2px; background: #3A3A3A; transition: width .25s, background-color .2s; }
.wdots i.on { width: 22px; background: var(--orange); }

@media (max-height: 860px) {
  .pad { height: 54px; }
  .voice { min-height: 46px; }
  .mrow__c i { height: 8px; }
  .voices { margin-bottom: 6px; }
}
@media (max-height: 700px) {
  .lcd__bpm { font-size: 32px; }
  .transport { padding-top: 6px; padding-bottom: 4px; }
  .play, .hwbtn--tap { height: 52px; }
  .knob__cap { width: 40px; height: 40px; }
  .pad { height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
