@font-face { font-family: 'Oswald'; src: url('fonts/Oswald.ttf') format('truetype'); font-weight: 200 700; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/InstrumentSerif-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/InstrumentSerif-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
:root {
  --bg: #0a0a0b; --bg2: #141214;
  --panel: rgba(26, 23, 24, .66); --panel2: rgba(255, 255, 255, .045); --line: rgba(255, 255, 255, .085); --hi: rgba(255, 255, 255, .14);
  --ink: #f2ede4; --mute: #a49c92; --dim: #6f6860;
  --red: #e3252e; --red2: #ff4a52; --red-deep: #7d0f16; --cream: #efe5d0; --ok: #62d68e; --warn: #f0b84a;
  --r: 20px; --r2: 12px;
  --label: 600 11px/1 'Oswald', 'Helvetica Neue', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { height: 100%; }
body { min-height: 100%; color: var(--ink); background: var(--bg); font: 13px/1.4 -apple-system, "SF Pro Text", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; user-select: none; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background:
  radial-gradient(900px 520px at 20% -10%, rgba(227, 37, 46, .28), transparent 60%),
  radial-gradient(700px 500px at 100% 110%, rgba(125, 15, 22, .35), transparent 60%),
  repeating-linear-gradient(115deg, rgba(255,255,255,.012) 0 2px, transparent 2px 5px),
  linear-gradient(180deg, #121012, var(--bg) 40%, #060607); }
body[data-view="popover"] { overflow: hidden; }
.app { display: flex; flex-direction: column; gap: 10px; padding: 12px; width: min(560px, 100%); margin: 0 auto; }
body[data-view="popover"] .app { width: 100%; height: 100vh; padding: 12px 12px 8px; }
body[data-view="studio"] .app { width: min(920px, 100%); padding: 18px 20px 24px; }
body[data-view="web"] .app { padding: 18px 12px 32px; }
/* view gates */
body[data-view="popover"] .studio-only, body[data-view="popover"] .web-only, body[data-view="popover"] .studio-web { display: none !important; }
body[data-view="studio"] .popover-only, body[data-view="studio"] .web-only { display: none !important; }
body[data-view="web"] .electron-only, body[data-view="web"] .popover-only { display: none !important; }
body:not(.mac) .mac-only { display: none !important; }

/* header */
.hdr { display: flex; align-items: center; gap: 10px; -webkit-app-region: drag; }
.hdr .btn { -webkit-app-region: no-drag; margin-left: auto; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 34px; height: 34px; border-radius: 10px; flex: none; position: relative; background: linear-gradient(160deg, #2b2628, #100e0f); box-shadow: inset 0 1px 0 var(--hi), 0 4px 12px rgba(0,0,0,.5); }
.logo::before { content: ""; position: absolute; left: 9px; top: 7px; width: 16px; height: 12px; border: 2.5px solid var(--cream); border-bottom: 0; border-radius: 9px 9px 0 0; }
.logo::after { content: ""; position: absolute; left: 8px; top: 16px; width: 18px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, var(--red) 0 5px, transparent 5px 13px, var(--red) 13px); }
.wordmark { font: italic 400 24px/1 'Instrument Serif', Georgia, serif; color: var(--red2); letter-spacing: .005em; text-shadow: 0 0 18px rgba(255,74,82,.35); }
.sub { color: var(--mute); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.pills { display: flex; gap: 6px; -webkit-app-region: no-drag; }
.pill { font: var(--label); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; background: var(--panel2); color: var(--mute); border: 1px solid var(--line); white-space: nowrap; }
.pill.on { color: #0d1a12; background: var(--ok); border-color: transparent; }
.pill.off { color: var(--ink); background: rgba(227,37,46,.22); border-color: rgba(227,37,46,.5); }
.pill.unk { color: var(--warn); }

/* glass panels */
.panel { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; backdrop-filter: blur(22px) saturate(1.35); -webkit-backdrop-filter: blur(22px) saturate(1.35); box-shadow: inset 0 1px 0 var(--hi), 0 10px 30px rgba(0,0,0,.45); }
.panel::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(165deg, rgba(255,255,255,.07), transparent 38%); }
.label { font: var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); display: inline-flex; align-items: center; gap: 8px; }
.row { display: flex; align-items: center; } .row.gap { gap: 8px; } .row.between { justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--mute); } .small { font-size: 11px; }
.big { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.note { color: var(--dim); font-size: 10.5px; line-height: 1.35; }

/* buttons */
.btn { appearance: none; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03)); color: var(--ink); font: 600 12px/1 'Oswald', sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 9px 13px; border-radius: 10px; cursor: pointer; box-shadow: inset 0 1px 0 var(--hi); position: relative; z-index: 1; }
.btn:hover { background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05)); } .btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #ff4a52, #b8151d); border-color: rgba(255,120,120,.35); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 14px rgba(227,37,46,.35); }
.btn.primary.active { background: linear-gradient(180deg, #7de3a3, #2e9c5a); color: #062011; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.btn.on { background: linear-gradient(180deg, #ff4a52, #b8151d); color: #fff; border-color: rgba(255,120,120,.35); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.small { padding: 6px 9px; font-size: 11px; }
.btn:disabled { opacity: .4; cursor: default; }
.link { background: none; border: 0; color: var(--mute); font: 600 11px 'Oswald', sans-serif; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; padding: 4px 2px; } .link:hover { color: var(--ink); }
.sel { appearance: none; background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: 9px; padding: 7px 26px 7px 10px; font: 600 11px 'Oswald', sans-serif; letter-spacing: .04em; max-width: 190px; text-overflow: ellipsis; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; position: relative; z-index: 1; }
.tog { appearance: none; border: 1px solid var(--line); background: var(--panel2); color: var(--mute); font: 600 10.5px 'Oswald', sans-serif; letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px 6px 20px; border-radius: 8px; cursor: pointer; position: relative; z-index: 1; }
.tog::before { content: ""; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-50%); background: #3a3436; box-shadow: inset 0 0 2px #000; }
.tog.on { color: var(--ink); border-color: rgba(255,255,255,.16); } .tog.on::before { background: var(--red2); box-shadow: 0 0 8px var(--red2), 0 0 2px #fff; }
.tog.warn.on { color: var(--warn); } .tog.warn.on::before { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.led { width: 8px; height: 8px; border-radius: 50%; background: #3a3436; box-shadow: inset 0 0 2px #000; display: inline-block; }
.led.on { background: var(--red2); box-shadow: 0 0 10px var(--red2), 0 0 2px #fff; }

/* meters */
.bezel { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; border-radius: 16px; background: linear-gradient(180deg, #17151a, #0b0a0c); box-shadow: inset 0 2px 8px rgba(0,0,0,.8), inset 0 -1px 0 rgba(255,255,255,.06), 0 1px 0 rgba(255,255,255,.05); position: relative; z-index: 1; }
.vu { width: 100%; aspect-ratio: 1.75; display: block; border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,.6); }
.recbar { display: flex; align-items: center; gap: 12px; margin-top: 12px; position: relative; z-index: 1; }
.rec { width: 52px; height: 52px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); background: radial-gradient(circle at 35% 30%, #ff6b70, #b8151d 65%, #6e0b10); box-shadow: 0 6px 18px rgba(227,37,46,.45), inset 0 2px 4px rgba(255,255,255,.35); cursor: pointer; display: grid; place-items: center; flex: none; }
.rec span { width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.9); transition: border-radius .2s, transform .2s; }
.rec.on span { border-radius: 3px; transform: scale(.9); animation: pulse 1.2s ease-in-out infinite; }
.rec:disabled { filter: grayscale(.8) brightness(.6); cursor: default; box-shadow: none; }
@keyframes pulse { 50% { opacity: .55; } }
.rectime { font: 500 26px/1 'Oswald', sans-serif; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--cream); min-width: 78px; }
.rectime.on { color: var(--red2); text-shadow: 0 0 12px rgba(255,74,82,.5); }
.mutebtn.on { background: linear-gradient(180deg, #ff4a52, #b8151d); color: #fff; border-color: rgba(255,120,120,.4); animation: pulse 1.4s ease-in-out infinite; }
.eqhdr { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); position: relative; z-index: 1; }
.knobs.eq { grid-template-columns: repeat(3, 76px) 1fr; margin-top: 8px; }
.reclist .rt { grid-column: 1 / -1; color: var(--cream); font: 13px/1.4 'Instrument Serif', Georgia, serif; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: text; }

/* knobs */
.knobs { display: grid; grid-template-columns: repeat(4, 76px) 1fr; gap: 10px; align-items: start; margin-top: 12px; position: relative; z-index: 1; }
.knob { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.knob canvas { width: 64px; height: 64px; cursor: ns-resize; touch-action: none; }
.kl { font: var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.kv { font: 500 12px 'Oswald', sans-serif; color: var(--cream); font-variant-numeric: tabular-nums; }
.knob-note { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
@media (max-width: 520px) { .knobs { grid-template-columns: repeat(4, 1fr); } .knobs.eq { grid-template-columns: repeat(3, 1fr); } .knob-note { grid-column: 1 / -1; } }

/* recordings */
.reclist { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; }
.reclist li { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 8px 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r2); }
.reclist .rn { font-weight: 600; font-size: 12.5px; } .reclist .rm { color: var(--mute); font-size: 11px; }
.reclist .ra { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.reclist audio { grid-column: 1 / -1; width: 100%; height: 30px; filter: invert(.92) hue-rotate(180deg) saturate(.6); }
.reclist .tsd { color: var(--ok); font-size: 11px; }
.transcript { margin-top: 10px; padding: 10px 12px; border-radius: var(--r2); background: rgba(0,0,0,.35); border: 1px solid var(--line); position: relative; z-index: 1; }
.tsbody { margin-top: 8px; max-height: 260px; overflow: auto; font: 15px/1.55 'Instrument Serif', Georgia, serif; color: var(--cream); user-select: text; }
.tsbody .seg { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 3px 0; border-top: 1px dashed rgba(255,255,255,.06); }
.tsbody .t { font: 500 11px/1.9 'Oswald', sans-serif; color: var(--mute); font-variant-numeric: tabular-nums; }
.progress { height: 4px; border-radius: 2px; background: var(--panel2); overflow: hidden; margin-top: 6px; } .progress i { display: block; height: 100%; background: var(--red); width: 0; transition: width .3s; }

/* battery */
.battery { display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: center; }
.battery .note { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 7px; }
.ring-wrap { position: relative; width: 104px; height: 104px; z-index: 1; }
.ring { width: 104px; height: 104px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--red); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 0; transition: stroke-dashoffset .5s ease, stroke .3s; filter: drop-shadow(0 0 6px rgba(227,37,46,.5)); }
.ring-fg.low { stroke: #ff5d5d; } .ring-fg.mid { stroke: var(--warn); }
.ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pct { font: 500 30px/1 'Oswald', sans-serif; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--cream); }
.approx { color: var(--mute); font-size: 20px; } .unit { font-size: 15px; color: var(--mute); }
.est { font: var(--label); color: var(--dim); text-transform: uppercase; letter-spacing: .12em; margin-top: 5px; font-size: 9.5px; }
.bat-side { display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; z-index: 1; }
.bat-side .row { margin-top: 6px; }
.setlevel { display: flex; gap: 8px; align-items: center; margin-top: 8px; } .setlevel input[type=range] { flex: 1; }

/* sliders + icons + media */
.ctl { display: flex; align-items: center; gap: 10px; margin-top: 9px; position: relative; z-index: 1; }
.ctl .val { width: 28px; text-align: right; color: var(--mute); font: 500 12px 'Oswald', sans-serif; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; flex: 1; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--red) var(--p, 50%), rgba(255,255,255,.1) var(--p, 50%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #bdb6ac 70%, #8b847a); box-shadow: 0 2px 5px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.2); cursor: pointer; }
.icon { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); display: grid; place-items: center; cursor: pointer; color: var(--ink); flex: none; position: relative; z-index: 1; box-shadow: inset 0 1px 0 var(--hi); }
.icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.big { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(180deg, #ff4a52, #b8151d); color: #fff; border-color: rgba(255,120,120,.35); } .icon.big svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.icon.muted-on { color: var(--red2); border-color: rgba(227,37,46,.5); } .icon.muted-on .wave { display: none; }
.icon:hover { filter: brightness(1.15); }
.media { display: flex; align-items: center; gap: 10px; margin-top: 10px; position: relative; z-index: 1; }
.media #lastBtn { margin-left: auto; text-align: right; max-width: 150px; }

/* history */
.hist .bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 36px; align-items: end; margin-top: 8px; position: relative; z-index: 1; }
.hist .bar { background: rgba(255,255,255,.08); border-radius: 3px 3px 2px 2px; min-height: 3px; }
.hist .bar.has { background: linear-gradient(180deg, var(--red2), var(--red-deep)); } .hist .bar.today { outline: 1px solid var(--cream); }

/* settings */
.settings { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; position: relative; z-index: 1; }
.opt input[type=number], .opt input[type=text] { width: 64px; background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--ink); border-radius: 7px; padding: 5px 7px; font: inherit; font-variant-numeric: tabular-nums; }
.opt input[type=text] { width: 70px; } #sMatch, #sName { width: 120px; }
.opt input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--red); }
.devlist { list-style: none; margin-top: 6px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.devlist li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; background: var(--panel2); border-radius: 8px; color: var(--mute); }
.devlist li.hit { color: var(--ink); outline: 1px solid rgba(227,37,46,.5); }
.gate p { color: var(--mute); font-size: 12px; line-height: 1.45; margin: 6px 0 10px; }
.ftr { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 26px; }
.fine { color: var(--dim); font-size: 11px; text-align: center; line-height: 1.4; }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
