/* =========================================================
   ECHORA — brand stylesheet
   Brand colors: Echo Violet #6C4CF5 · Ecko Coral #FF7A59 · Mint #22C7A9
   ========================================================= */

:root {
  --bg: #F7F5FF;
  --bg-2: #EFEBFF;
  --surface: #FFFFFF;
  --surface-2: #F3F0FF;
  --text: #1B1530;
  --muted: #625A7F;
  --border: #E3DDF7;
  --primary: #6C4CF5;
  --primary-600: #5A3BE0;
  --primary-soft: #ECE7FF;
  --on-primary: #FFFFFF;
  --accent: #FF7A59;
  --accent-soft: #FFE9E2;
  --mint: #12A88E;
  --mint-soft: #DDF7F1;
  --danger: #D93D42;
  --wave: #CFC6F3;
  --shadow-sm: 0 1px 2px rgba(40, 20, 110, .06), 0 2px 8px rgba(40, 20, 110, .05);
  --shadow: 0 2px 6px rgba(40, 20, 110, .06), 0 12px 32px rgba(40, 20, 110, .08);
  --ring: 0 0 0 3px rgba(108, 76, 245, .35);
  --radius: 18px;
  --radius-sm: 12px;
  --font-head: 'Fredoka', 'Baloo 2', ui-rounded, system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F0B1E; --bg-2: #160F2C; --surface: #19132E; --surface-2: #221A3D;
    --text: #F1EEFF; --muted: #A9A1C9; --border: #2F2652;
    --primary: #8B6CFF; --primary-600: #7A58FF; --primary-soft: #2A2050; --on-primary: #FFFFFF;
    --accent: #FF8A6B; --accent-soft: #3A2026; --mint: #3FDDBE; --mint-soft: #16332F;
    --danger: #FF6B70; --wave: #3B3166;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 10px 30px rgba(0,0,0,.35);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .i-moon { display: none; }
  :root:not([data-theme="light"]) .i-sun { display: block; }
}
:root[data-theme="dark"] {
  --bg: #0F0B1E; --bg-2: #160F2C; --surface: #19132E; --surface-2: #221A3D;
  --text: #F1EEFF; --muted: #A9A1C9; --border: #2F2652;
  --primary: #8B6CFF; --primary-600: #7A58FF; --primary-soft: #2A2050; --on-primary: #FFFFFF;
  --accent: #FF8A6B; --accent-soft: #3A2026; --mint: #3FDDBE; --mint-soft: #16332F;
  --danger: #FF6B70; --wave: #3B3166;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}
:root[data-theme="dark"] .i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--primary-600); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red, blue)) { .site-header { background: var(--bg); } }
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 700 1.45rem/1 var(--font-head); }
.brand img { width: 36px; height: 36px; transition: transform .4s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; transition: background .2s, color .2s; }
.nav a:hover { background: var(--primary-soft); color: var(--text); }
.nav a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
.header-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  transition: transform .2s var(--ease), background .2s;
}
.icon-btn:hover { background: var(--primary-soft); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }
.i-sun { display: none; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .header-actions { margin-left: auto; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 2px;
    padding: 10px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); margin: 0;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .25s var(--ease), opacity .2s, visibility .2s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
}

/* ---------- Buttons ---------- */
.btn {
  --b: var(--surface); --c: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 14px; border: 1px solid transparent;
  background: var(--b); color: var(--c); font: 600 .95rem/1 var(--font-body);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { color: var(--c); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { --b: var(--primary); --c: var(--on-primary); box-shadow: 0 6px 18px -6px var(--primary); }
.btn-primary:hover:not(:disabled) { --b: var(--primary-600); box-shadow: 0 10px 24px -8px var(--primary); }
.btn-accent { --b: var(--accent); --c: #fff; box-shadow: 0 6px 18px -6px var(--accent); }
.btn-soft { --b: var(--primary-soft); --c: var(--primary); }
.btn-ghost { --b: transparent; --c: var(--text); border-color: var(--border); }
.btn-ghost:hover { --b: var(--surface-2); }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 1.02rem; border-radius: 16px; }
.btn-sm { min-height: 36px; padding: 7px 12px; font-size: .85rem; border-radius: 10px; }
.btn-round { width: 52px; height: 52px; padding: 0; border-radius: 50%; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%; z-index: -1;
  background:
    radial-gradient(40% 50% at 20% 30%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%),
    radial-gradient(35% 45% at 85% 20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } .hero { padding: 80px 0 56px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: .85rem; margin-bottom: 16px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
.grad { background: linear-gradient(100deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--muted); max-width: 40em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 20px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: .92rem; }
.trust li { display: flex; align-items: center; gap: 6px; }
.trust svg { width: 18px; height: 18px; color: var(--mint); }

/* ---------- Ecko ---------- */
.ecko-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ecko { width: min(320px, 78vw); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ecko svg { width: 100%; height: auto; overflow: visible; }
.ecko-wrap--sm .ecko { width: 150px; }
.ecko-wrap--xs .ecko { width: 96px; }
.ecko-bubble {
  position: relative; order: -1; max-width: 300px; margin: 0 0 8px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-sm); font: 500 .95rem/1.4 var(--font-head); text-align: center;
}
.ecko-bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 14px; height: 14px; margin-left: -7px;
  background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}
.ecko-bubble.pop { animation: pop .35s var(--ease); }
.ecko .ecko-g { animation: float 3.4s ease-in-out infinite; }
.ecko .wing { transform-box: fill-box; transform-origin: 100% 35%; animation: flap 1.8s ease-in-out infinite; }
.ecko .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.ecko .note { animation: note 3.2s ease-in-out infinite; }
.ecko .note.n2 { animation-delay: 1.6s; }
.ecko.is-happy .ecko-g { animation: hop .6s var(--ease) 2; }
.ecko.is-happy .wing { animation-duration: .3s; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes flap { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-12deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes note { 0% { transform: translateY(6px); opacity: 0; } 30%, 70% { opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-22px) rotate(-4deg); } 70% { transform: translateY(2px); } }
@keyframes pop { 0% { transform: scale(.9); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sections & cards ---------- */
.section { padding: 48px 0; }
@media (min-width: 860px) { .section { padding: 72px 0; } }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.section-head p { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.tool-link {
  --tone: var(--primary); --tone-soft: var(--primary-soft);
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px;
  text-decoration: none; color: var(--text);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.tool-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--tone) 40%, var(--border)); color: var(--text); }
.tool-link .t-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); }
.tool-link .t-icon svg { width: 26px; height: 26px; }
.tool-link h3 { margin: 4px 0 0; }
.tool-link p { color: var(--muted); margin: 0; font-size: .95rem; }
.tool-link .go { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--tone); display: inline-flex; align-items: center; gap: 6px; }
.tool-link .go svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.tool-link:hover .go svg { transform: translateX(4px); }
.tone-coral { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.tone-mint { --tone: var(--mint); --tone-soft: var(--mint-soft); }
.badge { position: absolute; top: 16px; right: 16px; font-size: .72rem; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }

.feature { padding: 22px; }
.feature .f-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 12px; }
.feature .f-icon svg { width: 22px; height: 22px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

.steps { counter-reset: step; display: grid; gap: 16px; padding: 0; margin: 0; list-style: none; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; padding: 22px; position: relative; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 12px;
  border-radius: 12px; background: var(--primary); color: #fff; font: 600 1.1rem/1 var(--font-head);
}
.steps p { margin: 0; color: var(--muted); }

.cta-band {
  display: grid; gap: 20px; align-items: center; padding: 32px; border-radius: 24px;
  background: linear-gradient(120deg, var(--primary), #8F5CFF 55%, var(--accent)); color: #fff;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); margin: 0; }
.cta-band .btn { --b: #fff; --c: #4A2FD1; }
@media (min-width: 760px) { .cta-band { grid-template-columns: 1fr auto; padding: 40px 48px; } }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 1.4rem/1 var(--font-head); color: var(--primary); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 16px; margin: 0; }

/* ---------- Tool pages ---------- */
.tool-hero { padding: 28px 0 8px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.tool-hero-inner { display: grid; gap: 16px; align-items: end; }
@media (min-width: 760px) { .tool-hero-inner { grid-template-columns: 1fr auto; } }
.tool-hero h1 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); }
.tool-hero .lead { margin: 0; }
@media (max-width: 759px) { .tool-hero .ecko-wrap { display: none; } }

.tool { padding: 16px 0 24px; }
.tool-card { padding: 16px; }
@media (min-width: 720px) { .tool-card { padding: 24px; } }

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 240px; padding: 32px 20px; text-align: center; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); border-radius: var(--radius);
  background: var(--surface-2); transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.dropzone:hover, .dropzone.is-over, .is-dragging .dropzone { background: var(--primary-soft); border-color: var(--primary); }
.dropzone.is-over { transform: scale(1.01); }
.dropzone .dz-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--primary); color: #fff; margin-bottom: 8px; box-shadow: 0 10px 24px -10px var(--primary); }
.dropzone .dz-icon svg { width: 30px; height: 30px; }
.dropzone strong { font: 600 1.25rem/1.3 var(--font-head); }
.dropzone span { color: var(--muted); font-size: .95rem; }
.dropzone .btn { margin-top: 10px; pointer-events: none; }
.dropzone small { color: var(--muted); font-size: .8rem; margin-top: 6px; }
.dropzone--compact { min-height: 120px; padding: 20px; flex-direction: row; gap: 14px; text-align: left; }
.dropzone--compact .dz-icon { width: 48px; height: 48px; margin: 0; border-radius: 14px; }
.dropzone--compact .dz-icon svg { width: 24px; height: 24px; }
.dropzone--compact strong { font-size: 1.05rem; }
.dropzone--compact { flex-wrap: wrap; }
.dropzone--compact .btn, .dropzone--compact small { display: none; }
.dropzone--compact span { flex: 1 1 200px; }

.file-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.file-bar .f-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.file-bar .f-icon svg { width: 22px; height: 22px; }
.file-info { min-width: 0; flex: 1; }
.file-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info span { color: var(--muted); font-size: .88rem; }

audio { width: 100%; height: 44px; margin-bottom: 16px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-weight: 600; font-size: .86rem; color: var(--muted); }
input[type="text"], input[type="search"], input[type="email"], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: 400 1rem/1.4 var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857CA8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.check { display: flex; align-items: center; gap: 10px; font-size: .92rem; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
input[type="range"] { width: 100%; accent-color: var(--primary); height: 28px; }
.hint { color: var(--muted); font-size: .84rem; margin: 0; }
.fields { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; align-content: start; }
.fields .span-2 { grid-column: 1 / -1; }
@media (max-width: 540px) { .fields { grid-template-columns: 1fr; } }

.settings { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); padding: 16px; margin-bottom: 16px; background: var(--surface-2); border-radius: var(--radius-sm); align-items: end; }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.seg button { flex: 1; min-height: 36px; padding: 6px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 600 .9rem/1 var(--font-body); cursor: pointer; transition: background .2s, color .2s; }
.seg button[aria-checked="true"] { background: var(--primary); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 500 .88rem/1 var(--font-body); cursor: pointer; transition: background .2s, border-color .2s; }
.chip:hover { border-color: var(--primary); background: var(--primary-soft); }

.actions-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: flex-end; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--border); }
.actions-bar .grow { flex: 1 1 220px; }
@media (max-width: 540px) { .actions-bar > .btn { flex: 1 1 100%; } }

/* Progress */
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: inherit; transition: width .2s linear; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }

/* Tag editor */
.editor-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .editor-grid { grid-template-columns: 260px 1fr; } }
.cover {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 320px; margin: 0 auto; border-radius: 16px; overflow: hidden; cursor: pointer;
  background: var(--surface-2); border: 2px dashed var(--border); display: grid; place-items: center; transition: border-color .2s;
}
.cover:hover, .cover.is-over { border-color: var(--primary); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.has-img { border-style: solid; border-color: transparent; box-shadow: var(--shadow); }
.cover-empty { display: grid; justify-items: center; gap: 4px; color: var(--muted); text-align: center; padding: 16px; }
.cover-empty svg { width: 40px; height: 40px; color: var(--primary); }
.cover-empty span { font-weight: 600; color: var(--text); }
.cover-actions { display: flex; gap: 8px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.cover-col .check { justify-content: center; }
.cover-col .hint { text-align: center; margin-top: 8px; }

.lookup { margin-bottom: 20px; padding: 16px; border-radius: var(--radius-sm); background: linear-gradient(120deg, var(--primary-soft), var(--accent-soft)); }
.lookup-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lookup-row input { flex: 1 1 220px; }
.lookup h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 4px; }
.lookup h3 svg { width: 20px; height: 20px; color: var(--primary); flex: none; }
.lookup > p { font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.results { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 14px; }
.result {
  display: flex; gap: 12px; align-items: center; padding: 10px; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; cursor: pointer; color: var(--text);
  font: inherit; transition: border-color .2s, transform .2s var(--ease);
  animation: rise .35s var(--ease) both;
}
.result:hover { border-color: var(--primary); transform: translateY(-2px); }
.result .art { width: 56px; height: 56px; border-radius: 10px; flex: none; background: var(--surface-2) center/cover; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.result .art img { width: 100%; height: 100%; object-fit: cover; }
.result .r-text { min-width: 0; }
.result strong, .result span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result span { color: var(--muted); font-size: .84rem; }

/* Trimmer */
.wave { position: relative; height: 150px; border-radius: 14px; background: var(--surface-2); overflow: hidden; touch-action: none; cursor: crosshair; user-select: none; }
.wave canvas { width: 100%; height: 100%; }
.wave .sel { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--primary) 14%, transparent); border-left: 2px solid var(--primary); border-right: 2px solid var(--primary); pointer-events: none; }
.wave .handle { position: absolute; top: 0; bottom: 0; width: 24px; margin-left: -12px; cursor: ew-resize; z-index: 2; touch-action: none; }
.wave .handle::before { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 38px; margin: -19px 0 0 -7px; border-radius: 7px; background: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.wave .handle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 16px; margin: -8px 0 0 -1px; background: rgba(255,255,255,.8); border-radius: 2px; }
.wave .handle:focus-visible::before { box-shadow: var(--ring); }
.wave .playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; z-index: 1; }
.wave-times { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
.trim-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-top: 16px; }
.trim-row .field { width: 120px; }
.trim-row input { font-variant-numeric: tabular-nums; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat span { font-size: .86rem; font-weight: 600; color: var(--muted); }
.stat strong { font: 600 1.4rem/44px var(--font-head); font-variant-numeric: tabular-nums; }

/* Queue (converter / images) */
.queue { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.q-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); animation: rise .3s var(--ease) both; }
.q-item .q-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); overflow: hidden; }
.q-item .q-icon svg { width: 22px; height: 22px; }
.q-item .q-icon img { width: 100%; height: 100%; object-fit: cover; }
.q-main { min-width: 0; display: grid; gap: 6px; }
.q-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.q-meta { color: var(--muted); font-size: .84rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.saved { font-weight: 700; color: var(--mint); background: var(--mint-soft); padding: 2px 8px; border-radius: 999px; font-size: .78rem; }
.saved.neutral { color: var(--muted); background: var(--surface-2); }
.q-item.is-error .q-meta { color: var(--danger); }
.q-actions { display: flex; gap: 6px; }
.queue-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.queue-bar .summary { font-weight: 600; }
.queue-bar .summary em { font-style: normal; color: var(--mint); }
.queue-bar .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row output { min-width: 44px; text-align: right; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }

/* ---------- Content pages ---------- */
.content { padding: 32px 0 16px; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.page-head { padding: 40px 0 8px; text-align: center; }
.page-head .lead { margin: 0 auto; }

/* ---------- Ads ---------- */
.ad-slot { margin: 24px auto; max-width: 970px; text-align: center; }
.ad-slot:empty:not(.ad-slot--preview) { display: none; }
.ad-slot--live { min-height: 100px; }
.ad-slot--preview { min-height: 100px; display: grid; place-items: center; border: 1.5px dashed var(--border); border-radius: 14px; color: var(--muted); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.ad-slot--preview::before { content: attr(data-label); }
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 48px; padding: 48px 0 24px; border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.footer-brand { grid-column: 1 / -1; max-width: 340px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } .footer-brand { grid-column: auto; } }
.footer-brand p { color: var(--muted); font-size: .92rem; margin-top: 12px; }
.site-footer h3 { font-size: .95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--muted); text-decoration: none; font-size: .93rem; }
.site-footer ul a:hover, .site-footer ul a[aria-current="page"] { color: var(--primary); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 500; font-size: .93rem; box-shadow: var(--shadow); animation: rise .25s var(--ease); transition: opacity .3s, transform .3s; }
.toast--success { background: var(--mint); color: #062a23; }
.toast--warn { background: var(--accent); color: #fff; }
.toast--error { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* Appear-on-load for key sections (cheap, CSS only) */
.rise { animation: rise .6s var(--ease) both; }
.rise-2 { animation-delay: .08s; } .rise-3 { animation-delay: .16s; }

/* ---------- Performance & accessibility ---------- */
.lite .ecko .ecko-g, .lite .ecko .wing, .lite .ecko .note { animation: none; }
.lite .hero::before { display: none; }
.lite .tool-link:hover { transform: none; }
.lite .rise, .lite .result, .lite .q-item { animation: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .ecko .note { opacity: 0; }
}
@media print { .site-header, .site-footer, .ad-slot { display: none; } }
