/* audiojs utilities — shared shell */
:root {
  --c-ink: #0d1014; --c-paper: #edebe4; --c-bg: #f1efe9; --c-accent: #00a4b8; --c-mute: #6b6f73; --c-rule: #d6d3cb; --c-err: #b3261e; --c-ok: #1f7a4d;
  --f-body: 'Manrope', system-ui, sans-serif; --f-logo: 'Orbitron', sans-serif; --f-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-xs: clamp(12px, 1.5vw, 14px); --fs-sm: clamp(14px, 1.7vw, 16px); --fs-md: clamp(16px, 2vw, 19px); --fs-lg: clamp(22px, 3vw, 30px); --fs-xl: clamp(32px, 5vw, 48px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--f-body); background: var(--c-bg); color: var(--c-ink); min-height: 100vh; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }
a { color: inherit; }
code { font-family: var(--f-mono); font-size: .92em; }
.inner { max-width: 720px; margin: 0 auto; padding: 0 24px; }

.top { background: var(--c-ink); color: var(--c-paper); padding: 18px 0; }
.top .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: flex-end; gap: 6px; text-decoration: none; }
.brand .name { font-family: var(--f-logo); font-weight: 600; font-size: 22px; line-height: .8; letter-spacing: -.02em; }
.brand .js { border: 1px solid var(--c-paper); padding: 2px 3px; font-weight: 600; font-size: 13px; line-height: .85; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: .06em var(--c-paper); }
.top nav { font-size: var(--fs-xs); font-weight: 500; opacity: .8; }
.top nav a { text-decoration: none; }
.top nav a:hover { opacity: 1; text-decoration: underline; }

.hero { padding: 56px 0 16px; text-align: center; }
.hero h1 { font-weight: 800; font-size: var(--fs-xl); letter-spacing: -.03em; line-height: 1.05; }
.hero p { margin-top: 12px; font-size: var(--fs-md); font-weight: 500; color: var(--c-mute); }

.drop { margin-top: 32px; padding: 56px 24px; text-align: center; cursor: pointer; border: 2px dashed var(--c-rule); border-radius: 8px; background: var(--c-paper); transition: border-color .15s, background .15s; outline: none; }
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--c-accent); background: #e6ede9; }
.drop svg { width: 40px; height: 40px; display: block; margin: 0 auto 14px; }
.drop .t { font-size: var(--fs-md); font-weight: 700; letter-spacing: -.01em; }
.drop .s { margin-top: 6px; font-size: var(--fs-xs); font-weight: 500; color: var(--c-mute); }
.drop kbd { font: inherit; padding: 0 .35em; border: 1px solid var(--c-rule); border-radius: 3px; background: #fff; }
.drop input { display: none; }

.opts { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: center; font-size: var(--fs-sm); font-weight: 500; }
.opts label { display: inline-flex; align-items: center; gap: 8px; }
.opts input[type=range] { width: 160px; accent-color: var(--c-accent); }
.opts output { min-width: 3.5em; font-variant-numeric: tabular-nums; }

.panel { margin-top: 24px; border: 1px solid var(--c-rule); border-radius: 8px; background: var(--c-paper); overflow: hidden; }
.row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--c-rule); flex-wrap: wrap; }
.row:first-child { border-top: 0; }
.file { min-width: 0; flex: 1; }
.file .n { font-weight: 700; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .m { margin-top: 3px; font-size: var(--fs-xs); font-weight: 500; color: var(--c-mute); }
.status { font-size: var(--fs-sm); font-weight: 500; flex: 1; }
.status.err { color: var(--c-err); }
.bar { height: 4px; background: var(--c-rule); border-radius: 2px; overflow: hidden; width: 100%; }
.bar i { display: block; height: 100%; background: var(--c-accent); width: 0; transition: width .2s; }
.bar.busy i { width: 40%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

.report { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 24px; }
.report .k { font-size: var(--fs-xs); font-weight: 500; color: var(--c-mute); }
.report .v { margin-top: 2px; font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.report .v small { font-size: var(--fs-xs); font-weight: 600; color: var(--c-mute); margin-left: .3em; }
.report .v.ok { color: var(--c-ok); }
.report .v.warn { color: var(--c-err); }
.report .v.list { font-size: var(--fs-sm); font-weight: 600; line-height: 1.5; letter-spacing: 0; }
.report .wide { grid-column: 1 / -1; }
.report .note { grid-column: 1 / -1; font-size: var(--fs-xs); font-weight: 500; color: var(--c-mute); }
.viz { display: block; width: 100%; padding: 0; }
.viz canvas { display: block; width: 100%; height: auto; }

select, button { font: inherit; font-size: var(--fs-sm); color: var(--c-ink); }
select { padding: 8px 32px 8px 12px; border: 1px solid var(--c-rule); border-radius: 6px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230d1014' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; cursor: pointer; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 6px; background: var(--c-ink); color: var(--c-paper); font-weight: 700; text-decoration: none; cursor: pointer; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: transparent; color: var(--c-ink); border: 1px solid var(--c-rule); font-weight: 500; }
.btn.rec { background: var(--c-err); }
.btn svg { width: 16px; height: 16px; }
audio { width: 100%; display: block; }
.row.out { gap: 12px; }
.spacer { flex: 1; }
.privacy { margin-top: 18px; text-align: center; font-size: var(--fs-xs); font-weight: 500; color: var(--c-mute); }

.live { margin-top: 32px; padding: 32px 24px; text-align: center; border: 1px solid var(--c-rule); border-radius: 8px; background: var(--c-paper); }
.live .big { font-size: clamp(64px, 14vw, 120px); font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.live .sub { margin-top: 8px; font-size: var(--fs-md); font-weight: 600; color: var(--c-mute); font-variant-numeric: tabular-nums; }
.live .meter { position: relative; height: 10px; margin: 24px auto 0; max-width: 420px; background: var(--c-rule); border-radius: 5px; }
.live .meter::before { content: ''; position: absolute; left: 50%; top: -6px; width: 2px; height: 22px; background: var(--c-ink); }
.live .meter i { position: absolute; top: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--c-accent); left: 50%; transform: translateX(-50%); transition: left .08s, background .15s; }
.live .meter i.ok { background: var(--c-ok); }
.live .actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.live .time { font-family: var(--f-mono); font-size: var(--fs-lg); font-weight: 600; }

.seo { margin-top: 72px; padding: 48px 0 32px; border-top: 1px solid var(--c-rule); }
.seo h2 { font-weight: 800; font-size: var(--fs-lg); letter-spacing: -.02em; line-height: 1.15; }
.seo h3 { margin-top: 32px; font-weight: 700; font-size: var(--fs-md); letter-spacing: -.01em; }
.seo p { margin-top: 10px; font-size: var(--fs-sm); line-height: 1.55; }
.seo ul { margin: 10px 0 0; padding-left: 1.2em; font-size: var(--fs-sm); line-height: 1.55; }
.seo li { margin-top: 4px; }
.more { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c-rule); font-size: var(--fs-sm); }
.more h3 { margin: 0 0 10px; font-weight: 700; font-size: var(--fs-md); }
.more ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 20px; }
.more a { text-decoration: none; font-weight: 600; }
.more a:hover { text-decoration: underline; }

.index { margin-top: 32px; list-style: none; padding: 0; display: grid; gap: 12px; }
.index a { display: block; padding: 16px 18px; border: 1px solid var(--c-rule); border-radius: 8px; background: var(--c-paper); text-decoration: none; transition: border-color .15s; }
.index a:hover { border-color: var(--c-accent); }
.index .n { font-weight: 700; font-size: var(--fs-md); letter-spacing: -.01em; }
.index .d { margin-top: 3px; font-size: var(--fs-sm); font-weight: 500; color: var(--c-mute); }
.index .p { margin-top: 6px; font-size: var(--fs-xs); color: var(--c-mute); }

footer { padding: 32px 0 48px; text-align: center; font-size: var(--fs-xs); font-weight: 500; color: var(--c-mute); }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
