/* Animdock Tools (tools.animdock.com) — same design tokens as animdock.com (assets/style.css) */
:root, [data-theme="light"] {
  --bg: #F2F0F0; --surface: #FFFFFF; --text: #101111; --muted: #6B6B6B;
  --accent: #FF5466; --accent-hover: #E0394A; --accent-text: #FFFFFF;
  --hair: rgba(16,17,17,0.10); --border: #E0DEDE; --card: rgba(16,17,17,0.025); --card-border: rgba(16,17,17,0.12);
  --chip: rgba(16,17,17,0.04); --hover: rgba(16,17,17,0.05); --danger: #E05A30;
  --header-bg: rgba(242,240,240,0.82); --frame: #0C0D0D;
}
[data-theme="dark"] {
  --bg: #0C0D0D; --surface: #111212; --text: #F2F0F0; --muted: #8A8A8A;
  --hair: rgba(242,240,240,0.12); --border: #242525; --card: rgba(242,240,240,0.028); --card-border: rgba(242,240,240,0.12);
  --chip: rgba(242,240,240,0.05); --hover: rgba(242,240,240,0.06);
  --header-bg: rgba(12,13,13,0.72); --frame: #000;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Hanken Grotesk', system-ui, sans-serif; line-height: 1.55;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; }
h1, h2, h3 { font-family: 'Sora', sans-serif; letter-spacing: -0.03em; line-height: 1.1; }
button, input, select, textarea { font: inherit; color: inherit; }
.accent-sq { display: inline-block; width: 10px; height: 10px; background: var(--accent); flex: none; }
.t-wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; width: 100%; }

/* header */
.t-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 24px 36px;
  background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.t-header.scrolled { border-bottom-color: var(--hair); }
.t-logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); flex: none; }
/* "animdock tools." wordmark — same as stock.animdock.com's "animdock stock." (stock.css .s-word) */
.t-word { height: 22px; width: auto; display: block; fill: currentColor; overflow: visible; }
.t-tools { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 155.7px; letter-spacing: -6px; }
.t-dot { fill: var(--accent); }
.t-foot-brand .t-word { height: 20px; }
.t-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.t-nav a { text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 12px; color: var(--muted); transition: color .15s; }
.t-nav a:hover, .t-nav a[aria-current] { color: var(--text); }
.t-nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }
.t-nav a.t-ext::after { content: '↗'; font-size: 11px; margin-left: 3px; opacity: .6; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 1px solid var(--card-border); cursor: pointer; flex: none; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .sun { display: none; }
[data-theme="dark"] .icon-btn .sun { display: block; }
[data-theme="dark"] .icon-btn .moon { display: none; }
@media (max-width: 720px) {
  .t-header { flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
  .t-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; flex-wrap: nowrap; }
  .t-nav a { padding: 6px 10px; white-space: nowrap; }
  .icon-btn { margin-left: auto; }
  .t-wrap { padding: 0 16px; }
}

/* home hero — centered like stock.animdock.com / animdock.com */
.t-hero { position: relative; overflow: hidden; padding: 86px 0 70px; border-bottom: 1px solid var(--border); text-align: center; }
.t-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.t-hero .t-wrap { position: relative; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.t-hero-title { font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; font-size: clamp(36px, 6vw, 76px); margin: 18px auto 16px; max-width: 900px; }
.t-hero-title em { font-style: normal; color: var(--accent); }
.t-hero-lead { color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); max-width: 64ch; margin: 0 auto; line-height: 1.6; }
.t-points { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 40px auto 0; max-width: 980px; background: var(--card-border); border: 1px solid var(--card-border); text-align: left; }
.t-points li { background: var(--bg); padding: 18px 20px; display: grid; gap: 4px; align-content: start; }
.t-points b { font-family: 'Sora', sans-serif; font-size: 15px; color: var(--accent); }
.t-points span { color: var(--muted); font-size: 14px; }
@media (max-width: 720px) { .t-points { grid-template-columns: 1fr; } .t-hero { padding: 56px 0 44px; } }

.t-section { padding: 64px 28px 90px; }
.t-sec-head { margin-bottom: 24px; }
.t-sec-head h2, .t-sec-head h1 { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: clamp(22px, 3vw, 33px); }
.t-sec-head.big h1 { font-size: clamp(30px, 4.5vw, 52px); }
.t-sec-head p { margin-top: 7px; color: var(--muted); font-size: 14px; }

/* tool cards (like the template cards on animdock.com) */
.tool-grid { display: grid; gap: 15px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--card-border); padding: 10px; text-decoration: none; color: var(--text);
  transition: border-color .2s, transform .2s, box-shadow .2s; }
a.tool-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 30px rgba(255,84,102,.10); }
.tool-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--frame); display: grid; place-items: center; }
.tool-badge { position: absolute; top: 8px; left: 8px; z-index: 2; font: 800 9px 'Sora', sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; background: #F2F0F0; color: #0C0D0D; }
.tool-meta { margin-top: 10px; }
.tool-meta h3 { font-weight: 700; font-size: 14.5px; }
.tool-meta p { margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.tool-card.soon { border-style: dashed; }
.tool-card.soon .tool-thumb { background: transparent; }
.soon-txt { font: 700 15px/1.3 'Sora', sans-serif; color: var(--muted); text-align: center; }
/* audio-to-srt thumbnail */
.th-srt { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.th-wave { display: flex; align-items: center; gap: 3px; height: 54px; }
.th-wave i { width: 4px; height: 100%; background: #F2F0F0; opacity: .85; transform-origin: center; animation: wv 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.18s); }
.th-wave i:nth-child(3n) { background: #FF5466; }
@keyframes wv { 0%, 100% { transform: scaleY(.18); } 50% { transform: scaleY(1); } }
.th-cue { display: grid; justify-items: center; gap: 4px; }
.th-cue span { font: 500 10px ui-monospace, monospace; color: #8A8A8A; }
.th-cue b { font: 800 17px 'Sora', sans-serif; color: #F2F0F0; background: rgba(255,84,102,.9); padding: 3px 10px; letter-spacing: -.01em; }
@media (prefers-reduced-motion: reduce) { .th-wave i { animation: none; transform: scaleY(.6); } }

/* tool page */
.tool-page { padding-top: 34px; padding-bottom: 80px; }
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.tool-h1 { font-weight: 800; font-size: clamp(32px, 5vw, 60px); letter-spacing: -0.04em; max-width: 20ch; }
.tool-intro { margin-top: 16px; font-size: 16px; color: var(--muted); max-width: 78ch; }

.srt-app { margin-top: 34px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 0; border: 1px solid var(--card-border); background: var(--card); }
.srt-left { padding: 22px; border-right: 1px solid var(--card-border); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.srt-right { padding: 22px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 860px) { .srt-app { grid-template-columns: 1fr; } .srt-left { border-right: 0; border-bottom: 1px solid var(--card-border); } }
.drop { flex: 1; min-height: 280px; display: grid; place-items: center; text-align: center; border: 1.5px dashed var(--card-border); cursor: pointer; padding: 24px;
  transition: border-color .15s, background .15s; outline: none; }
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--accent); background: var(--hover); }
.drop-empty { display: grid; justify-items: center; gap: 8px; }
.drop-empty[hidden] { display: none; }
.drop-empty svg { color: var(--accent); margin-bottom: 6px; }
.drop-empty b { font: 700 18px 'Sora', sans-serif; letter-spacing: -.02em; }
.drop-empty span { color: var(--muted); font-size: 13.5px; }
.drop-file { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left; width: 100%; max-width: 520px; }
.drop-file[hidden] { display: none; }
.df-icon { grid-row: span 2; width: 48px; height: 48px; background: var(--accent); display: grid; place-items: center; color: #fff; font: 800 11px 'Sora', sans-serif; }
.df-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-info { color: var(--muted); font-size: 13px; grid-column: 2; }
.df-clear { grid-row: 1 / span 2; grid-column: 3; width: 34px; height: 34px; border: 1px solid var(--card-border); background: none; cursor: pointer; font-size: 20px; line-height: 1; }
.df-clear:hover { border-color: var(--accent); }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); }
.privacy-note svg { flex: none; margin-top: 3px; color: #10b981; }
.srt-progress { display: grid; gap: 6px; }
.srt-progress[hidden] { display: none; }
.srt-progress .bar { height: 6px; background: var(--chip); overflow: hidden; }
.srt-progress .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.srt-progress .bar.ind i { width: 30% !important; animation: ind 1.2s ease-in-out infinite; }
@keyframes ind { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.ptxt { font-size: 13px; color: var(--muted); }
.ptxt.err { color: var(--danger); font-weight: 600; }

.field { display: grid; gap: 8px; }
.field > label, .flabel { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; display: flex; justify-content: space-between; }
.field output { color: var(--text); font-family: 'Sora', sans-serif; font-size: 14px; }
.field small { color: var(--muted); font-size: 12px; }
.field select { width: 100%; padding: 11px 12px; background: var(--bg); border: 1px solid var(--card-border); border-radius: 0; outline: none; }
.field select:focus { border-color: var(--accent); }
.segs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.segs.small { grid-template-columns: repeat(2, 1fr); }
.seg { display: grid; justify-items: center; gap: 5px; padding: 12px 6px; background: var(--bg); border: 1px solid var(--card-border); cursor: pointer; font-weight: 600; font-size: 13px; transition: border-color .15s; }
.segs.small .seg { padding: 9px 6px; }
.seg:hover { border-color: var(--text); }
.seg[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.field#wordsField[hidden] { display: none; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.opts { display: flex; gap: 18px; flex-wrap: wrap; }
.chk { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.chk input { accent-color: var(--accent); width: 16px; height: 16px; }
.go { margin-top: auto; padding: 15px; background: var(--accent); color: var(--accent-text); border: 0; font: 700 16px 'Sora', sans-serif; cursor: pointer; transition: background .15s; }
.go:hover:not(:disabled) { background: var(--accent-hover); }
.go:disabled { opacity: .45; cursor: not-allowed; }

.srt-result { margin-top: 18px; display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: 18px; align-items: start; }
.srt-result[hidden] { display: none; }
@media (max-width: 860px) { .srt-result { grid-template-columns: 1fr; } }
.frame { position: relative; background: var(--frame); aspect-ratio: 9/16; max-height: 70vh; margin: 0 auto; overflow: hidden; border: 1px solid var(--card-border); }
.frame.wide { aspect-ratio: 16/9; width: 100%; }
.frame .media { position: absolute; inset: 0; display: grid; place-items: center; }
.frame video { width: 100%; height: 100%; object-fit: cover; }
.frame.wide video { object-fit: contain; }
.frame audio { width: 92%; position: absolute; bottom: 10px; left: 4%; }
.frame .cap { position: absolute; left: 6%; right: 6%; top: 58%; text-align: center; font: 800 clamp(16px, 2.2vw, 24px)/1.15 'Sora', sans-serif; color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.8), 0 0 2px #000; pointer-events: none; white-space: pre-line; }
.frame.wide .cap { top: auto; bottom: 14%; font-size: clamp(13px, 1.6vw, 18px); font-weight: 700; }
.frame.has-audio .cap { top: 38%; }
.res-text { display: grid; gap: 10px; min-width: 0; }
.res-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.res-head b { font-family: 'Sora', sans-serif; font-size: 15px; }
.res-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.res-actions button { padding: 9px 14px; border: 1px solid var(--card-border); background: var(--bg); cursor: pointer; font-weight: 600; font-size: 13px; }
.res-actions button:hover { border-color: var(--accent); }
.res-actions button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
#srtOut { width: 100%; min-height: 420px; resize: vertical; padding: 14px; background: var(--bg); border: 1px solid var(--card-border); border-radius: 0;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; outline: none; }
#srtOut:focus { border-color: var(--accent); }
.res-text small { color: var(--muted); font-size: 12px; }

.tool-usecases { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); max-width: 900px; }
.tool-usecases h2 { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: clamp(22px, 2.8vw, 30px); margin-bottom: 16px; }
.tool-usecases p { font-size: 16.5px; line-height: 1.75; color: var(--muted); }

/* listing + article */
.t-listing { padding-top: 56px; padding-bottom: 90px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; margin-top: 10px; }
.post-card { display: grid; gap: 8px; align-content: start; padding: 22px; border: 1px solid var(--card-border); background: var(--card); text-decoration: none; transition: border-color .2s, transform .2s; }
.post-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.pc-tag { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.post-card h3 { font-size: 19px; font-weight: 700; }
.post-card p { color: var(--muted); font-size: 14px; }
.post-empty { color: var(--muted); border: 1px dashed var(--card-border); padding: 30px; text-align: center; grid-column: 1 / -1; }
.t-article { max-width: 780px; padding-top: 40px; padding-bottom: 90px; }
.art-kicker { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.art-title { font-weight: 800; font-size: clamp(30px, 4.6vw, 50px); }
.art-lead { margin-top: 16px; font-size: 18px; color: var(--muted); }
.art-body { margin-top: 34px; font-size: 17px; line-height: 1.75; }
.art-body > * + * { margin-top: 1.05em; }
.art-body h2 { font-size: 26px; margin-top: 1.8em; }
.art-body h3 { font-size: 20px; margin-top: 1.5em; }
.art-body ul, .art-body ol { padding-left: 1.3em; }
.art-body li + li { margin-top: .35em; }
.art-body a { color: var(--accent); text-underline-offset: 3px; }
.art-body code { background: var(--chip); padding: 1px 6px; font-size: .9em; }
.art-body pre { background: var(--chip); padding: 14px; overflow-x: auto; }
.art-body blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; color: var(--muted); }
.art-body img { max-width: 100%; height: auto; }
.art-cta { display: inline-block; margin-top: 40px; padding: 16px 26px; background: var(--accent); color: var(--accent-text); text-decoration: none; font: 700 15px 'Sora', sans-serif; }

/* footer */
.t-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.t-foot-inner { max-width: 1160px; margin: 0 auto; padding: 50px 28px 30px; display: flex; gap: 40px; justify-content: space-between; flex-wrap: wrap; }
.t-foot-brand { max-width: 320px; display: grid; gap: 12px; align-content: start; }
.t-foot-brand p { color: var(--muted); font-size: 14px; }
.t-foot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.t-foot-title { font: 700 12px 'Sora', sans-serif; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.t-foot-cols ul { list-style: none; display: grid; gap: 7px; }
.t-foot-cols a { color: var(--muted); text-decoration: none; font-size: 14px; }
.t-foot-cols a:hover { color: var(--text); }
.t-foot-bottom { max-width: 1160px; margin: 0 auto; padding: 18px 28px 30px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--hair); }
@media (max-width: 720px) { .t-foot-inner, .t-foot-bottom { padding-left: 16px; padding-right: 16px; } .t-foot-cols { gap: 32px; } }

/* ── media tools (pages.mjs, assets/t/*.js) ── */
.media-app .srt-left { gap: 12px; }
.media-app .drop { min-height: 230px; }
.segs.five { grid-template-columns: repeat(5, 1fr) !important; }
.segs.seven { grid-template-columns: repeat(4, 1fr) !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row output { font-family: 'Sora', sans-serif; font-size: 14px; min-width: 52px; }
.row input[type=range] { flex: 1; }
.field input[type=number], .field select { padding: 9px 10px; background: var(--bg); border: 1px solid var(--card-border); border-radius: 0; outline: none; color: var(--text); }
.field input[type=number] { width: 110px; }
.field input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--card-border); background: var(--bg); cursor: pointer; }
.field [hidden], .row[hidden], .field[hidden] { display: none !important; }
.go.alt { background: var(--bg); color: var(--text); border: 1px solid var(--card-border); margin-top: 0; }
.go.alt:hover:not(:disabled) { background: var(--hover); border-color: var(--accent); }
.file-list { list-style: none; display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.file-list:empty { display: none; }
.file-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--card-border); background: var(--bg); font-size: 13px; }
.file-list img, .file-list .ph { width: 44px; height: 44px; object-fit: cover; background: var(--chip); display: block; }
.file-list .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list .fm { color: var(--muted); font-size: 12px; }
.file-list .fm b { color: #10b981; font-weight: 700; }
.file-list .fm .bad { color: var(--danger); }
.file-list button, .res-btn { padding: 7px 11px; border: 1px solid var(--card-border); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--text); text-decoration: none; display: inline-block; }
.file-list button:hover, .res-btn:hover { border-color: var(--accent); }
.res-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.media-result { margin-top: 18px; border: 1px solid var(--card-border); background: var(--card); padding: 18px; display: grid; gap: 14px; }
.media-result[hidden] { display: none; }
.media-result .res-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.media-result video, .media-result img.out { max-width: 100%; max-height: 60vh; display: block; margin: 0 auto; background: #000; }
.media-result audio { width: 100%; display: block; }
.checker { background-color: #fff; background-image: linear-gradient(45deg, #d9d9d9 25%, transparent 25%), linear-gradient(-45deg, #d9d9d9 25%, transparent 25%),
  linear-gradient(45deg, transparent 75%, #d9d9d9 75%), linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);
  background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.bg-item { border: 1px solid var(--card-border); background: var(--bg); padding: 8px; display: grid; gap: 8px; }
.bg-item .pic { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.bg-item .pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bg-item .fm { font-size: 12px; color: var(--muted); }
.frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.frames figure { position: relative; border: 1px solid var(--card-border); background: #000; cursor: pointer; }
.frames figure img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: contain; }
.frames figure figcaption { position: absolute; left: 4px; bottom: 4px; font: 600 11px ui-monospace, monospace; background: rgba(0,0,0,.7); color: #fff; padding: 2px 5px; }
.frames figure.off { opacity: .35; }
.frames figure::after { content: '\2713'; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; }
.frames figure.off::after { background: rgba(0,0,0,.6); content: ''; }
.fx-player { display: grid; gap: 8px; }
.fx-player[hidden] { display: none; }
.fx-player video { width: 100%; max-height: 52vh; background: #000; display: block; }
.fx-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fx-bar button { padding: 8px 12px; border: 1px solid var(--card-border); background: var(--bg); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text); }
.fx-bar button:hover { border-color: var(--accent); }
.fx-bar span { font: 600 14px ui-monospace, monospace; }
.fx-app .drop { min-height: 180px; }
.est { border: 1px solid var(--card-border); background: var(--bg); padding: 12px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.est[hidden] { display: none; }
.est b { color: var(--text); }
.subtools { margin-top: 30px; display: grid; gap: 10px; }
.sub-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sub-chips a { padding: 8px 13px; border: 1px solid var(--card-border); text-decoration: none; font-weight: 600; font-size: 13.5px; background: var(--card); transition: border-color .15s, color .15s; }
.sub-chips a:hover { border-color: var(--accent); color: var(--accent); }
.sub-chips a[aria-current] { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.tool-info { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 34px; max-width: 1000px; }
.tool-info h2 { font-weight: 800; font-size: clamp(19px, 2.2vw, 24px); margin-bottom: 10px; }
.tool-info p { color: var(--muted); font-size: 15.5px; line-height: 1.7; }
@media (max-width: 760px) { .tool-info { grid-template-columns: 1fr; } }
.tool-faq { margin-top: 50px; max-width: 900px; display: grid; gap: 8px; }
.tool-faq h2 { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: clamp(22px, 2.8vw, 30px); margin-bottom: 8px; }
.tool-faq details { border: 1px solid var(--card-border); background: var(--card); }
.tool-faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.tool-faq summary::-webkit-details-marker { display: none; }
.tool-faq summary::after { content: '+'; color: var(--accent); font-weight: 800; }
.tool-faq details[open] summary::after { content: '\2013'; }
.tool-faq details p { padding: 0 16px 16px; color: var(--muted); font-size: 15px; line-height: 1.65; }

/* card thumbnails of the media tools (render.mjs THUMBS) */
.th-icon { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; color: #F2F0F0; font: 800 15px 'Sora', sans-serif; }
.th-icon .chip { padding: 6px 10px; border: 1.5px solid rgba(242,240,240,.6); letter-spacing: .04em; }
.th-icon .chip.to { background: #FF5466; border-color: #FF5466; }
.th-icon .arr { color: #FF5466; font-size: 20px; animation: thArr 2s ease-in-out infinite; }
@keyframes thArr { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
.th-bars { display: flex; align-items: flex-end; gap: 10px; height: 70px; }
.th-bars i { width: 22px; background: rgba(242,240,240,.85); transform-origin: bottom; animation: thShrink 3.2s ease-in-out infinite; }
.th-bars i:nth-child(1) { height: 100%; }
.th-bars i:nth-child(2) { height: 70%; background: #FF5466; animation-delay: -.4s; }
.th-bars i:nth-child(3) { height: 45%; animation-delay: -.8s; }
@keyframes thShrink { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.55); } }
/* background remover: a person on a photo background; the background wipes away to the transparency checkerboard */
.th-bg { width: 46%; aspect-ratio: 1; position: relative; overflow: hidden; }
.th-bg .ck { position: absolute; inset: 0; background-color: #2a2b2b; background-image: linear-gradient(45deg, #3a3b3b 25%, transparent 25%), linear-gradient(-45deg, #3a3b3b 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #3a3b3b 75%), linear-gradient(-45deg, transparent 75%, #3a3b3b 75%); background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0; }
.th-bg .fill { position: absolute; inset: 0; background: linear-gradient(135deg, #5b7fa6, #9ab7d1); animation: thWipe 4s ease-in-out infinite; }
.th-bg .head { position: absolute; left: 50%; top: 16%; width: 26%; aspect-ratio: 1; transform: translateX(-50%); background: #FF5466; border-radius: 50%; }
.th-bg .body { position: absolute; left: 50%; bottom: 0; width: 56%; height: 40%; transform: translateX(-50%); background: #FF5466; border-radius: 50% 50% 0 0 / 60% 60% 0 0; }
@keyframes thWipe { 0%, 12% { clip-path: inset(0 0 0 0); } 48%, 62% { clip-path: inset(0 0 0 100%); } 98%, 100% { clip-path: inset(0 0 0 0); } }

/* video resizer: a 16:9 frame that grows and shrinks, with arrows out of two opposite corners */
.th-frame { position: relative; width: 56%; aspect-ratio: 16/9; border: 1.5px solid rgba(242,240,240,.75); animation: thResize 3.2s ease-in-out infinite; }
.th-frame b { position: absolute; width: 18px; height: 18px; color: #FF5466; display: block; }
.th-frame b svg { width: 100%; height: 100%; display: block; }
.th-frame b.tr { right: -9px; top: -9px; transform: rotate(90deg); }
.th-frame b.bl { left: -9px; bottom: -9px; transform: rotate(270deg); }
@keyframes thResize { 0%, 100% { width: 56%; } 50% { width: 36%; } }

/* frame extractor: a red highlight runs over the frames, left to right */
.th-film { display: flex; gap: 6px; }
.th-film i { width: 34px; height: 46px; border: 1.5px solid rgba(242,240,240,.6); animation: thFilm 1.8s steps(1, end) infinite; }
.th-film i:nth-child(2) { animation-delay: .6s; }
.th-film i:nth-child(3) { animation-delay: 1.2s; }
@keyframes thFilm { 0% { border-color: #FF5466; background: rgba(255,84,102,.3); } 33.3%, 100% { border-color: rgba(242,240,240,.6); background: transparent; } }
@media (prefers-reduced-motion: reduce) { .th-icon *, .th-bars i, .th-bg .fill, .th-frame, .th-film i { animation: none !important; } }

/* imported video preview (video tools) */
.media-app .drop.has-file { min-height: 0; flex: none; padding: 16px; }
.vprev[hidden] { display: none; }
.vbox { position: relative; margin: 0 auto; max-width: 100%; max-height: 52vh; background: #000; overflow: hidden; }
.vbox video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.vbox .crop { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 2px solid #FF5466;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.55); pointer-events: none; transition: width .25s, height .25s; }
.vbox .crop[hidden] { display: none; }
.vbox .crop span { position: absolute; left: 6px; top: 6px; font: 700 11px 'Sora', sans-serif; color: #fff; background: #FF5466; padding: 2px 6px; }

/* home page tool search */
.t-search { position: relative; max-width: 640px; margin: 30px auto 0; display: flex; align-items: center; gap: 10px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--card-border); box-shadow: 0 18px 50px rgba(0,0,0,.12); text-align: left; transition: border-color .15s; }
.t-search:focus-within { border-color: var(--accent); }
.t-search > svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.t-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 17px 0; font-size: 16px; color: var(--text); }
.t-search input::placeholder { color: var(--muted); }
.t-results { position: absolute; left: -1px; right: -1px; top: 100%; z-index: 30; background: var(--surface); border: 1px solid var(--card-border); border-top: 0;
  box-shadow: 0 22px 60px rgba(0,0,0,.25); max-height: min(60vh, 440px); overflow-y: auto; overscroll-behavior: contain; }
.t-results[hidden] { display: none; }
.t-r { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 9px 14px; text-decoration: none; color: var(--text); border-left: 2px solid transparent; }
.t-r:hover, .t-r.on { background: var(--hover); border-left-color: var(--accent); }
.t-r .ic { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--card-border); color: var(--accent); }
.t-r .ic svg { width: 16px; height: 16px; }
.t-r b { display: block; font-size: 14px; font-weight: 600; }
.t-r small { display: block; font-size: 12px; color: var(--muted); }
.t-r em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.t-none { padding: 14px; color: var(--muted); font-size: 14px; }
.tool-card.hide { display: none; }

/* Markdown tables (server/render.mjs mdToHtml) */
.md-table { overflow-x: auto; margin: 1.2em 0; }
.md-table table { border-collapse: collapse; width: 100%; font-size: .92em; }
.md-table th, .md-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--card-border); vertical-align: top; }
.md-table th { font-family: 'Sora', sans-serif; font-size: .82em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* download page — "While you are waiting…" (t/download.js), styled like stock.animdock.com's */
.dl-view { padding-top: 46px; padding-bottom: 70px; }
.dl-page { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 34px; align-items: center; border: 1px solid var(--card-border); background: var(--card); padding: 26px; }
@media (max-width: 820px) { .dl-page { grid-template-columns: 1fr; padding: 16px; } }
.dl-thumb { position: relative; aspect-ratio: 16/10; background: #0C0D0D; display: grid; place-items: center; overflow: hidden; }
.dl-thumb img, .dl-thumb video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; transition: filter .4s, opacity .4s; }
.dl-thumb.busy img, .dl-thumb.busy video, .dl-thumb.busy .dv-file { filter: blur(6px) saturate(.7); opacity: .6; }
.dl-spin { position: absolute; inset: 0; display: none; place-items: center; }
.dl-thumb.busy .dl-spin { display: grid; }
.dl-spin span { display: flex; gap: 6px; }
.dl-spin i { width: 10px; height: 10px; background: #FF5466; animation: dlBounce 1s ease-in-out infinite; }
.dl-spin i:nth-child(2) { animation-delay: .15s; } .dl-spin i:nth-child(3) { animation-delay: .3s; }
@keyframes dlBounce { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-9px); opacity: 1; } }
.dv-file { display: grid; justify-items: center; gap: 8px; color: #F2F0F0; }
.dv-file svg { width: 64px; height: 64px; }
.dv-file em { font: 800 15px 'Sora', sans-serif; font-style: normal; color: #FF5466; }
.dl-info { display: grid; gap: 12px; align-content: center; justify-items: start; }
.dl-state { font: 800 clamp(24px, 3vw, 34px)/1.12 'Sora', sans-serif; letter-spacing: -.03em; }
.dl-title { color: var(--muted); font-size: 14px; word-break: break-all; }
.dl-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 360deg), var(--card-border) 0); position: relative; }
.dl-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--bg); }
.dl-ring span { position: relative; font: 800 20px 'Sora', sans-serif; }
.dl-ring[hidden] { display: none; }
.dl-go { display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; background: var(--accent); color: var(--accent-text); border: 0; font: 700 16px 'Sora', sans-serif; cursor: pointer; }
.dl-go:hover { background: var(--accent-hover); }
.dl-go[hidden] { display: none; }
.dl-go.appear { animation: dlIn .35s ease; }
@keyframes dlIn { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.dl-back { background: none; border: 0; color: var(--muted); font: 600 14px 'Hanken Grotesk', sans-serif; cursor: pointer; padding: 4px 0; }
.dl-back:hover { color: var(--text); }
.dl-info .note { color: var(--muted); font-size: 12.5px; }
.dv-h1 { font-weight: 800; font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -.04em; margin: 56px 0 6px; }
.dv-sec { margin-top: 30px; }
.dv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.dv-head h2 { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: clamp(19px, 2.2vw, 24px); }
.dv-head a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 14px; }
.dv-grid { display: grid; gap: 14px; }
.dv-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dv-grid.imgs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 820px) { .dv-grid.four, .dv-grid.imgs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dv-card { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--card-border); background: var(--card); text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s; }
.dv-card:hover, .dv-tool:hover, .dv-img:hover { border-color: var(--accent); transform: translateY(-3px); }
.dv-thumb { aspect-ratio: 16/10; overflow: hidden; margin-bottom: 6px; }
.dv-thumb.dark { background: var(--bg); }
.dv-thumb canvas { width: 100%; height: 100%; display: block; }
.dv-card b { font-family: 'Sora', sans-serif; font-size: 14px; }
.dv-card small { color: var(--muted); font-size: 12px; }
.dv-img { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; border: 1px solid var(--card-border); transition: border-color .2s, transform .2s; }
.dv-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dv-img span { position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: rgba(12,13,13,.72); color: #F2F0F0; padding: 3px 6px; }
.dv-tool { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--card-border); background: var(--card); text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s; }
.dv-tool .ic { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--card-border); color: var(--accent); }
.dv-tool .ic svg { width: 18px; height: 18px; }
.dv-tool b { display: block; font-family: 'Sora', sans-serif; font-size: 14px; }
.dv-tool small { display: block; color: var(--muted); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .dl-spin i { animation: none; } }
.dl-thumb.checker { background-color: #fff; background-image: linear-gradient(45deg, #d9d9d9 25%, transparent 25%), linear-gradient(-45deg, #d9d9d9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d9d9d9 75%), linear-gradient(-45deg, transparent 75%, #d9d9d9 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
