/* Amapianos Studio - landscape DAW layout (owner, 15 Nov 2026) */
:root { --bg: #0b1020; --panel: #121a2e; --panel2: #18223b; --line: #26324f; --text: #e8edf8; --dim: #8796bd;
        --acc: #ff9800; --acc2: #e8457a; --good: #43a047; --bad: #e53935; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.35 system-ui, "Segoe UI", Roboto, Arial, sans-serif; overflow: hidden; }
button, select, input { font: inherit; color: inherit; }
button { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; cursor: pointer; }
button:hover { border-color: #3d4d78; } button.on { background: #2b3a63; border-color: #5a74b8; }
button.danger { color: #ff8a80; } button.primary { background: var(--acc); color: #1b1200; border-color: var(--acc); font-weight: 700; }
select, input[type=number], input:not([type]) { background: #0e1527; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
input[type=range] { accent-color: var(--acc); }
.dim { color: var(--dim); } .small { font-size: 11px; }
#app { display: grid; grid-template-columns: 200px 1fr; grid-template-rows: auto 1fr auto; height: 100vh; height: 100dvh; min-width: 640px; }
#top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 10px; background: linear-gradient(#18223b, #111a2e); border-bottom: 1px solid var(--line); }
.brand { font-size: 15px; margin-right: 6px; white-space: nowrap; } .brand b { color: var(--acc); }
.beta { font-size: 10px; background: #2b3a63; padding: 1px 6px; border-radius: 99px; color: #aebee6; vertical-align: middle; }
.grp { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.transport label { display: flex; align-items: center; gap: 4px; color: var(--dim); } .transport input[type=range] { width: 70px; }
#bpm { width: 58px; }
.big { font-size: 16px; min-width: 42px; } #play.on { background: var(--good); border-color: var(--good); }
#rec.on { background: var(--bad); border-color: var(--bad); color: #fff; } .mode.on { background: var(--acc); color: #1b1200; border-color: var(--acc); font-weight: 700; }
.lcd { display: flex; gap: 10px; background: #050913; border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; font: 600 14px/1.4 ui-monospace, Consolas, monospace; color: #7cf2a9; min-width: 128px; justify-content: space-between; }
.filebtn { position: relative; overflow: hidden; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; cursor: pointer; display: inline-block; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; } .filebtn.wide { display: block; text-align: center; margin: 6px 0; }
#browser { background: var(--panel); border-right: 1px solid var(--line); padding: 8px; overflow-y: auto; }
#browser h4 { margin: 12px 0 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); display: flex; justify-content: space-between; align-items: center; }
#proj-name { width: 100%; font-weight: 700; }
.blist { display: grid; gap: 3px; } .blist button { text-align: left; display: flex; align-items: center; gap: 7px; padding: 4px 7px; justify-content: space-between; }
.blist button i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 9px; } .blist button { justify-content: flex-start; }
.proj { display: flex; gap: 3px; } .proj button:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; } .proj .x { color: #ff8a80; }
.mini-btn { padding: 0 6px; font-size: 11px; } .keyrow { display: flex; gap: 4px; } .keyrow select { flex: 1; }
#main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#views { display: flex; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; align-items: center; }
.vtab { padding: 5px 14px; } .vtab.on { background: var(--acc); color: #1b1200; border-color: var(--acc); font-weight: 700; }
.patctl { margin-left: auto; display: flex; gap: 5px; align-items: center; color: var(--dim); } #patbars { width: 48px; } #patsel { max-width: 200px; }
.view { flex: 1; min-height: 0; overflow: auto; padding: 8px; }
.view[hidden] { display: none !important; }
.hint { color: var(--dim); font-size: 11px; margin: 8px 2px; }
/* channel rack */
.row { display: flex; align-items: center; gap: 5px; padding: 3px 4px; border-radius: 6px; }
.row.sel { background: #1a2442; }
.led { width: 22px; padding: 0; color: #334; border-radius: 50%; height: 22px; } .led.on { color: #7cf2a9; }
.solo { width: 22px; padding: 0; height: 22px; font-size: 11px; } .solo.on { background: #fdd835; color: #222; }
.knob { width: 52px; } .knob.pan { width: 40px; }
.cname { width: 118px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins { width: 44px; padding: 2px; }
.steps { display: flex; gap: 2px; flex: 1; min-width: 0; padding: 2px 0; }
.step { flex: 1 1 0; min-width: 7px; max-width: 30px; height: 26px; padding: 0; border-radius: 3px; background: #222d4a; border-color: #2b3757; }
.steps .step:nth-child(16n+1):not(:first-child) { margin-left: 4px; }
.step.alt { background: #2c385a; } .step.on { background: color-mix(in srgb, var(--acc) calc(var(--v) * 100%), #3b2a12); border-color: var(--acc); }
.step.now { outline: 2px solid #fff; outline-offset: -2px; }
.mini { background: #0e1527; border-radius: 4px; height: 26px; flex: 0 0 auto; cursor: pointer; }
.ico { padding: 2px 5px; }
/* piano roll */
.toolbar { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 6px; } .toolbar label { color: var(--dim); display: flex; gap: 4px; align-items: center; }
.tool.on { background: var(--acc); color: #1b1200; }
#v-roll { display: flex; flex-direction: column; }
.pr-body { flex: 1; display: flex; min-height: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
#pr-keys-wrap { width: 54px; overflow: hidden; flex: 0 0 54px; }
#pr-wrap { flex: 1; overflow: auto; position: relative; } .pr-inner, .pl-inner { position: relative; display: inline-block; }
#pr-canvas, #pl-canvas { display: block; touch-action: none; }
.head { position: absolute; top: 0; bottom: 0; width: 2px; background: #7cf2a9; pointer-events: none; box-shadow: 0 0 6px #7cf2a9; }
.pr-velrow { display: flex; margin-top: 4px; } .vlabel { width: 54px; color: var(--dim); font-size: 10px; padding-top: 4px; }
#pr-vel-wrap { flex: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; } #pr-vel { display: block; touch-action: none; }
/* playlist */
#v-playlist { display: flex; flex-direction: column; }
.pl-body { flex: 1; display: flex; min-height: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
#pl-heads { width: 150px; flex: 0 0 150px; overflow: hidden; background: var(--panel); }
.pl-rh { height: 22px; color: var(--dim); font-size: 10px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.pl-th { height: 34px; display: flex; align-items: center; gap: 4px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.pl-th input { flex: 1; min-width: 0; background: transparent; border-color: transparent; } .pl-th.add { border: 0; }
#pl-wrap { flex: 1; overflow: auto; }
.au-row { display: flex; margin-top: 6px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.au-ctl { width: 150px; flex: 0 0 150px; padding: 6px; display: grid; gap: 4px; background: var(--panel); align-content: start; } .au-ctl select { width: 100%; }
#au-wrap { flex: 1; overflow: hidden; } #au-canvas { display: block; touch-action: none; }
/* mixer */
#mixer { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.strip { flex: 0 0 96px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.strip.master { border-color: var(--acc); flex-basis: 108px; }
.sname { width: 100%; font-size: 11px; font-weight: 700; text-align: center; padding: 2px; }
.meter { align-self: center; border-radius: 3px; }
.fader { writing-mode: vertical-lr; direction: rtl; height: 120px; align-self: center; width: 28px; }
.strip label { display: grid; font-size: 10px; color: var(--dim); } .strip label input { width: 100%; }
.ms { display: flex; gap: 3px; } .ms button { flex: 1; padding: 2px; } .ms button.on { background: #fdd835; color: #222; }
.tog.on { background: var(--good); border-color: var(--good); color: #fff; }
.routed { font-size: 10px; color: var(--dim); min-height: 26px; overflow: hidden; }
.fxrow { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 8px; background: var(--panel); border-radius: 8px; margin-top: 6px; }
.fxrow label { display: flex; gap: 6px; align-items: center; color: var(--dim); }
#foot { grid-column: 1 / -1; padding: 4px 10px; font-size: 11px; color: var(--dim); background: var(--panel); border-top: 1px solid var(--line); }
/* dialog + toast */
#dlg { position: fixed; inset: 0; background: rgba(3,6,14,.7); display: grid; place-items: center; z-index: 50; }
#dlg[hidden] { display: none; }
#dlg-box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; width: min(520px, 94vw); max-height: 90vh; overflow: auto; display: grid; gap: 8px; }
#dlg-box h3 { margin: 0 0 4px; } #dlg-box label { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px; align-items: center; color: var(--dim); }
.dlg-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-top: 6px; }
.help { padding-left: 18px; line-height: 1.6; margin: 0; }
#toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px); background: #1f2b4a; border: 1px solid #3d4d78; padding: 8px 16px; border-radius: 99px; opacity: 0; transition: .2s; pointer-events: none; z-index: 60; }
#toast.on { opacity: 1; transform: translateX(-50%); } #toast.bad { background: #4a1f25; border-color: var(--bad); }
/* landscape only: a portrait phone gets the rotate card */
#rotate { display: none; }
@media (orientation: portrait) and (max-width: 820px) {
  #rotate { display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; background: var(--bg); text-align: center; padding: 24px; }
  #rotate .rot-ico { font-size: 54px; } #rotate button { background: var(--acc); color: #1b1200; border: 0; padding: 10px 18px; font-weight: 700; margin-top: 10px; }
  #app { display: none; }
}
@media (max-height: 520px) {                 /* phones in landscape: tighter */
  #app { grid-template-columns: 150px 1fr; } #top { gap: 6px; padding: 4px 6px; } .brand .beta, #f-saveas, #f-json, .filebtn[title] { display: none; }
  .step { height: 22px; min-width: 3px; } .cname { width: 76px; } .knob { width: 34px; } .knob.pan { width: 28px; } #foot { display: none; }
}
#browser h4 .dim { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 10px; }
.pub { background: #1f6f3a; border-color: #2e9d55; }
.songs-link { font-size: 11px; margin-left: 6px; color: #9fd3ff; text-decoration: none; }
.brand a { color: inherit; text-decoration: none; }
a.btnlink { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; color: var(--text); text-decoration: none; }
#pl-mic.on { background: var(--bad); border-color: var(--bad); color: #fff; }
#spec { background: #0b1020; border-radius: 6px; border: 1px solid var(--line); }
.x.hist { color: #9fd3ff; }
#countin.on { background: var(--acc); color: #1b1200; }
/* Guide tab */
.vguide { margin-left: 6px; background: #1f6f3a; border-color: #2e9d55; }
.vguide.on { background: var(--acc); }
.guide { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; height: 100%; }
.g-player video { width: 100%; max-height: calc(100vh - 190px); background: #000; border-radius: 10px; }
.g-chapters { overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.g-chapters h5 { margin: 10px 4px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--acc); }
.g-ch { display: flex; gap: 8px; width: 100%; text-align: left; padding: 5px 7px; margin: 2px 0; background: transparent; border-color: transparent; }
.g-ch:hover { background: var(--panel2); } .g-ch.on { background: #2b3a63; border-color: #5a74b8; }
.g-ch .t { color: var(--dim); font: 11px ui-monospace, Consolas, monospace; min-width: 38px; padding-top: 2px; }
@media (max-height: 520px) { .guide { grid-template-columns: minmax(0, 1fr) 210px; } }
/* the way back to the site (installed app has no back button) */
.sitenav { display: flex; align-items: center; gap: 6px; }
.site-back { background: #ff9800; color: #1b1200; font-weight: 800; padding: 5px 12px; border-radius: 8px; text-decoration: none; white-space: nowrap; }
.site-back:hover { filter: brightness(1.08); }
.site-menu { position: relative; }
.site-menu summary { list-style: none; cursor: pointer; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; white-space: nowrap; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu nav { position: absolute; top: calc(100% + 6px); left: 0; z-index: 80; min-width: 210px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.5); display: grid; }
.site-menu nav a { color: var(--text); text-decoration: none; padding: 7px 10px; border-radius: 7px; display: flex; gap: 8px; }
.site-menu nav a:hover { background: var(--panel2); }
.site-menu nav i { font-style: normal; width: 18px; text-align: center; }
@media (max-height: 520px) { .site-back { padding: 4px 8px; } .brand { display: none; } }

/* piano roll: "this instrument has no notes in this pattern" hint */
.pr-hint { font-size: 12px; color: #ffd8a8; background: rgba(255,152,0,.12); border: 1px solid rgba(255,152,0,.4); border-radius: 6px; padding: 3px 8px; }
.pr-hint button { background: #ff9800; color: #1b1200; border: 0; border-radius: 5px; padding: 2px 8px; font-weight: 700; cursor: pointer; margin-left: 2px; }
.pr-hint[hidden] { display: none; }

/* Guide tab: choose which video */
.g-pick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.g-pick button { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; }
.g-pick button.on { background: #ff9800; color: #1b1200; border-color: #ff9800; }
.g-ear { font-style: normal; font-size: 11px; opacity: .8; }

/* Guide tab: the Studio helper chat (assistant.js) */
.g-ask { display: flex; flex-direction: column; height: calc(100vh - 175px); min-height: 260px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.g-ask[hidden] { display: none; }
.as-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.as-msg { max-width: min(680px, 88%); padding: 9px 12px; border-radius: 12px; line-height: 1.5; font-size: 13.5px; }
.as-bot { background: var(--panel2); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.as-me { background: #ff9800; color: #1b1200; align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 600; }
.as-topic { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--acc); margin-bottom: 4px; font-weight: 700; }
.as-opts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.as-opts button { border-radius: 8px; padding: 6px 12px; font-weight: 700; }
.as-opts button.on { background: #2b3a63; border-color: #5a74b8; }
.as-opts .dim { font-weight: 400; font-size: 11px; }
.as-text { margin-top: 8px; }
.as-vid { margin-top: 8px; } .as-vid video { width: 100%; max-height: 46vh; border-radius: 8px; background: #000; display: block; }
.as-more { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.as-chip { border-radius: 14px; padding: 4px 10px; font-size: 12px; }
.as-form { display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--line); background: var(--panel2); }
.as-form input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 14px; }
.as-form button { padding: 0 16px; border-radius: 9px; }
.as-dots i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--dim); animation: asb 1s infinite; }
.as-dots i:nth-child(2) { animation-delay: .15s; } .as-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes asb { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (max-height: 520px) { .g-ask { height: calc(100vh - 120px); } .as-msg { font-size: 12.5px; max-width: 94%; } }
@media (max-width: 760px) { .as-msg { max-width: 96%; } }
/* small screens: the chat takes the full width while it is open */
@media (max-width: 900px) { .guide.asking { grid-template-columns: 1fr; } .guide.asking .g-chapters { display: none; } }

/* My songs: the folder in the sidebar + its floating window */
.folder { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,152,0,.16), rgba(255,152,0,.05)); border: 1px solid rgba(255,152,0,.45); }
.folder:hover, .folder.open { background: linear-gradient(135deg, rgba(255,152,0,.3), rgba(255,152,0,.1)); }
.fold-tx { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; } .fold-tx .dim { font-size: 11px; }
.fold-n { background: #ff9800; color: #1b1200; font-weight: 800; font-size: 11px; border-radius: 10px; padding: 1px 7px; }
.fold-ic { position: relative; width: 30px; height: 23px; flex: none; }
.fold-ic::before { content: ""; position: absolute; left: 0; top: 0; width: 13px; height: 6px; background: #f0a63a; border-radius: 3px 3px 0 0; }
.fold-ic i { position: absolute; left: 0; top: 4px; width: 30px; height: 19px; background: linear-gradient(#ffb74d, #ef8f00); border-radius: 2px 5px 5px 5px; box-shadow: inset 0 2px 0 rgba(255,255,255,.35); }
.folder.open .fold-ic i { transform: skewX(-8deg); transform-origin: bottom; }
.fold-ic.sm { width: 22px; height: 17px; } .fold-ic.sm i { width: 22px; height: 14px; top: 3px; } .fold-ic.sm::before { width: 10px; height: 5px; }
.proj-last { width: 100%; text-align: left; margin-top: 5px; font-size: 12px; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.float-win { position: fixed; top: 110px; left: 230px; z-index: 45; width: min(460px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 130px));
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid #ff9800; border-radius: 14px; box-shadow: 0 22px 60px rgba(0,0,0,.6); overflow: hidden; }
.float-win[hidden] { display: none; }
.fw-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 12px; background: linear-gradient(#22304f, #1a2540); cursor: move; touch-action: none; user-select: none; }
.fw-head b { font-size: 14px; } .fw-head .dim { margin-left: 4px; }
.fw-x { margin-left: auto; width: 28px; height: 28px; padding: 0; border-radius: 50%; }
.fw-tools { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.fw-tools input { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.fw-list { overflow-y: auto; padding: 6px; flex: 1; } .fw-list .pad { padding: 10px; }
.sf-row { display: flex; align-items: center; gap: 4px; border-radius: 9px; padding: 2px; }
.sf-row:hover { background: var(--panel2); } .sf-row.cur { background: rgba(255,152,0,.12); outline: 1px solid rgba(255,152,0,.4); }
.sf-open { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; text-align: left; background: transparent; border-color: transparent; padding: 6px 8px; }
.sf-ic { width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center; background: #2b3a63; color: #ffcc80; font-size: 16px; }
.sf-tx { display: flex; flex-direction: column; min-width: 0; } .sf-tx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-now { color: #ff9800; font-weight: 700; }
.fw-foot { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--panel2); } .fw-foot button { flex: 1; }
@media (max-height: 520px) { .float-win { top: 8px; max-height: calc(100vh - 16px); left: auto; right: 8px; } }

/* SEO heading: read by screen readers and search engines, not drawn */
.seo-h1 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
