:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f0f2f8; --text: #171a2b; --muted: #5d6479;
  --border: #e2e5ef; --brand: #4f46e5; --brand-2: #4338ca; --danger: #dc2626; --ok: #059669;
  --pdf: #e5322d; --image: #0d9488; --video: #7c3aed; --audio: #ea580c; --ai: #db2777; --utility: #2563eb;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
  color-scheme: light;
}
.task-paths{margin-block:2rem}.task-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;align-items:start}
.task-path{padding:1.15rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);min-width:0;margin:0}
.task-path summary{font-size:1rem;font-weight:650;cursor:pointer}.task-path p{font-size:.92rem;color:var(--muted);margin:.8rem 0}
.task-path ol{padding-inline-start:1.3rem;margin:0}.task-path li{margin-block:.35rem}.task-path a{overflow-wrap:anywhere}
.tool-jumps{display:flex;flex-wrap:wrap;gap:.5rem;margin-block:1rem}.tool-jumps a{border:1px solid var(--border);border-radius:2rem;padding:.4rem .85rem;background:var(--surface);font-size:.9rem;text-decoration:none}
.tool-jumps a:hover,.tool-jumps a:focus-visible{border-color:var(--brand);text-decoration:underline}
#tool,#tool-howto,#tool-faq,#tool-guide,#task-paths{scroll-margin-top:9rem}
@media(max-width:1000px){.task-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.task-grid{grid-template-columns:1fr}}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f111a; --surface: #181b27; --surface-2: #212534; --text: #e8eaf3; --muted: #9aa1b8;
    --border: #2a2f42; --brand: #818cf8; --brand-2: #a5b4fc; --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; margin: .4em 0 .2em; letter-spacing: -.02em; }
h2 { font-size: 1.35rem; margin: 1.8em 0 .7em; }
h3 { font-size: 1rem; margin: 0 0 .4em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 1.2em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--text); display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-mark { color: var(--brand); }
.catnav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.catnav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; white-space: nowrap; font-weight: 600; font-size: .92rem; }
.catnav a:hover, .catnav a.active { background: var(--surface-2); color: var(--text); text-decoration: none; }
.langsel select { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: .9rem; }
@media (max-width: 720px) {
  .topbar-in { flex-wrap: wrap; gap: 6px 12px; padding: 8px 0; }
  .catnav { order: 3; flex-basis: 100%; }
  .langsel { margin-inline-start: auto; }
}

/* language suggestion */
.langbar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px;
  background: color-mix(in srgb, var(--brand) 14%, var(--surface)); border-bottom: 1px solid var(--border); font-weight: 600; }
.langbar a { color: var(--text); }

/* hero + search */
.hero { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--bg)), var(--bg)); padding: 40px 0 28px; text-align: center; }
.hero .lead { max-width: 640px; margin: 0 auto 1.4em; }
.search { width: 100%; max-width: 560px; padding: 14px 18px; font: inherit; font-size: 1.05rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search:focus { outline: 2px solid var(--brand); outline-offset: 2px; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; color: var(--text); transition: transform .12s, box-shadow .12s, border-color .12s; }
.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--c, var(--brand)); }
.card-icon { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; background: var(--c, var(--brand)); }
.card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-body span { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.cat-pdf { --c: var(--pdf); } .cat-image { --c: var(--image); } .cat-video { --c: var(--video); }
.cat-audio { --c: var(--audio); } .cat-ai { --c: var(--ai); } .cat-utility { --c: var(--utility); }
.catblock h2 a { color: var(--text); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.why-grid > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.why-grid p { margin: 0; color: var(--muted); }

/* ads */
.ad { margin: 18px 0; min-height: 90px; text-align: center; }
.ad-label { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ad-demo { display: grid; place-items: center; border: 2px dashed var(--border); border-radius: var(--radius); color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.adgate { position: fixed; inset: 0; background: rgba(8,10,20,.72); z-index: 100; display: grid; place-items: center; padding: 16px; }
.adgate-box { background: var(--surface); border-radius: var(--radius); padding: 20px; width: min(520px, 100%); text-align: center; }
.ad-gate-slot { min-height: 250px; margin: 0 0 12px; }

/* tool page */
.crumbs { font-size: .88rem; color: var(--muted); margin-top: 18px; }
.crumbs a { color: var(--muted); }
.tool-head h1 { margin-top: .3em; }
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 20px; box-shadow: var(--shadow); }
.privacy-note { color: var(--muted); font-size: .9rem; text-align: center; margin: 10px 0 0; }
.drop { border: 2px dashed color-mix(in srgb, var(--c) 45%, var(--border)); background: color-mix(in srgb, var(--c) 5%, var(--surface)); border-radius: var(--radius); padding: 36px 16px; text-align: center; cursor: pointer; transition: background .15s; }
.drop.over { background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.drop p { margin: 10px 0 0; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 13px 22px; font: inherit; font-weight: 700; font-size: 1.02rem; cursor: pointer; background: var(--c, var(--brand)); color: #fff; text-decoration: none; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-lg { padding: 16px 30px; font-size: 1.1rem; }
.btn-ghost { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.btn-sm { padding: 7px 12px; font-size: .88rem; border-radius: 9px; }
.files { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.files li { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.files .thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--border); flex: none; display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: var(--muted); }
.files .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .fsize { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.files .handle { cursor: grab; color: var(--muted); padding: 0 4px; user-select: none; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem; padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover { background: var(--border); color: var(--text); }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin: 18px 0 0; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: .92rem; font-weight: 600; }
.field input[type=text], .field input[type=password], .field input[type=number], .field select, .field textarea {
  font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 100%;
}
.field input[type=color] { width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 3px; }
.field input[type=range] { accent-color: var(--c); }
.field .hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
.field.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.field.check input { width: 18px; height: 18px; accent-color: var(--c); }
.time-row { display: flex; gap: 6px; }
.time-row input { flex: 1; min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.status { text-align: center; margin: 18px 0 0; }
.bar { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 10px auto; max-width: 420px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--c); transition: width .3s; }
.bar.indet > i { width: 35%; animation: indet 1.2s infinite ease-in-out; }
@keyframes indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.error { color: var(--danger); font-weight: 600; text-align: center; margin: 14px 0 0; }
.results { margin-top: 18px; text-align: center; }
.results h3 { font-size: 1.3rem; color: var(--ok); }
.result-list { list-style: none; padding: 0; margin: 12px auto; max-width: 560px; display: grid; gap: 8px; text-align: start; }
.result-list li { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.result-list .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saving { color: var(--ok); font-weight: 700; }
.result-preview { max-width: 100%; max-height: 420px; border-radius: 12px; margin: 10px auto 0; display: block;
  background: repeating-conic-gradient(#d4d4d8 0 25%, #fff 0 50%) 0 0 / 20px 20px; }
.preview-media { width: 100%; max-height: 360px; border-radius: 12px; background: #000; margin-top: 14px; }
audio.preview-media { background: transparent; }

/* organize pdf */
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 16px; }
.pg { background: var(--surface-2); border-radius: 10px; padding: 8px; text-align: center; cursor: grab; position: relative; border: 2px solid transparent; }
.pg canvas { max-width: 100%; height: auto; box-shadow: var(--shadow); background: #fff; transition: transform .2s; }
.pg.deleted { opacity: .35; }
.pg .pg-tools { display: flex; justify-content: center; gap: 2px; margin-top: 6px; }
.pg .pg-num { font-size: .8rem; color: var(--muted); }
.sortable-ghost { opacity: .4; }

/* crop */
.crop-stage { position: relative; display: inline-block; max-width: 100%; margin-top: 14px; touch-action: none; user-select: none; }
.crop-stage img { display: block; max-width: 100%; max-height: 70vh; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); cursor: move; }
.crop-box i { position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 50%; border: 2px solid var(--c); }
.crop-box i[data-h=nw] { left: -9px; top: -9px; cursor: nwse-resize; } .crop-box i[data-h=ne] { right: -9px; top: -9px; cursor: nesw-resize; }
.crop-box i[data-h=sw] { left: -9px; bottom: -9px; cursor: nesw-resize; } .crop-box i[data-h=se] { right: -9px; bottom: -9px; cursor: nwse-resize; }
.center { text-align: center; }

/* utilities */
.qr-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.qr-out { text-align: center; background: var(--surface-2); border-radius: var(--radius); padding: 16px; }
.qr-out img, .qr-out canvas { max-width: 100%; image-rendering: pixelated; background: #fff; }
@media (max-width: 720px) { .qr-layout { grid-template-columns: 1fr; } }
.wc-text { width: 100%; min-height: 260px; font: inherit; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); resize: vertical; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .85rem; }
.tool-example { padding:18px; margin:24px 0; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.tool-example dd { margin-inline-start:0; }
.tool-example pre { white-space:pre-wrap; overflow-wrap:anywhere; padding:12px; background:var(--surface-2); border-radius:8px; font:inherit; }
.text-tools table { width:100%; border-collapse:collapse; margin:20px 0; font-size:.9rem; }
.text-tools th,.text-tools td { padding:10px 8px; text-align:start; border-bottom:1px solid var(--border); }
.text-tools thead { background:var(--surface-2); }
.text-tools tbody tr:nth-child(even) { background:var(--surface-2); }
.text-tools progress { width:100%; accent-color:var(--primary); }
.text-tools input[type=file] { max-width:100%; padding:12px; border:1px dashed var(--border); border-radius:12px; background:var(--surface-2); }
.text-tools input[type=file]::file-selector-button { border:0; border-radius:8px; padding:10px 14px; margin-inline-end:10px; background:var(--surface); color:var(--text); font:inherit; cursor:pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { background: var(--surface-2); border-radius: 99px; padding: 4px 10px; font-size: .88rem; }
.pw-out { display: flex; gap: 8px; }
.pw-out input { flex: 1; min-width: 0; font: 600 1.25rem/1.4 ui-monospace, Consolas, monospace; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 12px 0 4px; }
.meter i { display: block; height: 100%; transition: width .2s, background .2s; }

/* SEO text + footer */
.seo { margin-top: 32px; }
.prose { max-width: 820px; }
.prose p, .prose li { color: var(--text); }
.tool-guide { margin-block: 28px; }
.guide-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.guide-table-wrap table { width: 100%; border-collapse: collapse; text-align: start; font-size: .95rem; }
.guide-table-wrap caption { padding: 12px 16px; text-align: start; font-weight: 650; background: var(--surface-2); }
.guide-table-wrap th, .guide-table-wrap td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.guide-table-wrap th { text-align: start; }
.guide-table-wrap th[scope="row"] { width: 34%; }
.guide-table-wrap:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.tool-share { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 24px; padding-block: 20px; border-block: 1px solid var(--border); }
.tool-share .secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.tool-share label { display: block; flex-basis: 100%; min-width: 0; }
.tool-share input { display: block; width: 100%; padding: 10px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.tool-share [role="status"] { flex-basis: 100%; margin: 0; font-size: .9rem; }
.tool-share [role="status"]:empty { display: none; }
@media(max-width:480px) { .guide-table-wrap th, .guide-table-wrap td { padding: 10px; } }
.steps li { margin: .4em 0; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin: 8px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: .6em 0 0; color: var(--muted); }
.footer { margin-top: 56px; background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0 20px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; }
.footer h3 a { color: var(--text); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 4px 0; }
.footer li a { color: var(--muted); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; border-top: 1px solid var(--border); margin-top: 24px; padding-top: 16px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a { color: var(--muted); }

/* Preview and accurate range selection */
.trim-controls{margin:18px auto 24px;padding:18px;background:var(--bg2,#161b28);border:1px solid var(--border,#30374a);border-radius:16px;max-width:800px}
.trim-transport,.trim-markers,.trim-footer{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:8px 0}
.trim-current,.trim-summary{font-variant-numeric:tabular-nums;color:var(--muted,#b8c0d0)}
.trim-range{display:grid;grid-template-columns:135px 1fr;gap:12px;align-items:center;margin:14px 0;font-size:14px}
.trim-range input{width:100%;accent-color:#4f7cff;cursor:ew-resize;padding:0}
.url-field{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.url-field input{width:100%;direction:ltr}.url-field button{align-self:flex-start}
.youtube-player{max-width:800px;margin:auto;aspect-ratio:16/9}.youtube-player iframe{width:100%;height:100%;min-height:220px;border:0;border-radius:12px}
.preview-media{transition:transform .15s;max-height:360px}
@media(max-width:600px){.trim-controls{padding:12px}.trim-range{grid-template-columns:1fr;gap:4px}.trim-markers button{flex:1}.youtube-player{aspect-ratio:auto;height:240px}}
/* Playback ruler and precise trim controls */
.trim-controls{background:var(--surface);box-shadow:0 12px 32px #00000012}
.trim-transport{justify-content:flex-start}.trim-current{margin-left:auto;font-weight:700;color:var(--text)}
.trim-step{padding:8px;border-radius:8px;background:var(--surface-2);color:var(--text);border:1px solid var(--border)}
.trim-ruler{position:relative;height:40px;margin:14px 8px 0;background:var(--surface-2);border-radius:8px;isolation:isolate}
.trim-selection{position:absolute;top:8px;height:24px;background:#4f7cff66;border-left:3px solid #4f7cff;border-right:3px solid #4f7cff;pointer-events:none;border-radius:3px}
.trim-playhead{position:absolute;top:2px;bottom:2px;width:3px;background:#e85a5a;pointer-events:none;z-index:2;transform:translateX(-50%)}
.trim-seek{position:absolute;inset:0;width:100%;height:40px;margin:0;padding:0;appearance:none;background:transparent;cursor:pointer;z-index:3;accent-color:#e85a5a}
.trim-seek::-webkit-slider-runnable-track{height:40px;background:transparent}.trim-seek::-webkit-slider-thumb{appearance:none;width:14px;height:14px;border-radius:50%;margin-top:13px;background:#e85a5a;border:2px solid white;box-shadow:0 0 0 2px #e85a5a}
.trim-seek::-moz-range-track{background:transparent}.trim-seek::-moz-range-thumb{background:#e85a5a;border:2px solid white;border-radius:50%}
.trim-ticks{display:flex;justify-content:space-between;margin:4px 8px;color:var(--muted);font-size:.8rem;font-variant-numeric:tabular-nums}
.trim-position{display:block;text-align:center;color:var(--muted);font-size:.9rem;min-height:24px;margin:10px 0}
.trim-boundaries{display:grid;grid-template-columns:1fr 1fr;gap:12px}.trim-boundary{padding:12px;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;min-width:0}
.trim-boundary-title{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:10px}.trim-boundary-title button{font-size:.75rem}
.trim-exact-row{display:flex;gap:5px;align-items:center}.trim-exact-row .btn{padding:9px 7px;font-size:.8rem;white-space:nowrap}.trim-exact{width:100%;min-width:0;padding:10px 6px;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--text);font:600 1.1rem ui-monospace,monospace;text-align:center}
.trim-boundary>input[type=range]{width:100%;padding:0;accent-color:#4f7cff;margin:16px 0 0}.trim-footer{justify-content:space-between;border-top:1px solid var(--border);padding-top:14px;margin-top:14px}.trim-footer .btn{background:#4f7cff;color:white}
@media(max-width:600px){.trim-boundaries{grid-template-columns:1fr}.trim-transport{gap:6px}.trim-current{width:100%;text-align:center}.trim-footer{justify-content:center}.trim-summary{text-align:center}}
.editor-preview{scroll-margin-top:76px}.url-field input{padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);color:var(--text);font:inherit}
#tool:has(.trim-controls) .options .field[data-key=start],#tool:has(.trim-controls) .options .field[data-key=end]{display:none}
#tool .status,#tool .results{scroll-margin-top:90px}.status:not(:empty){min-height:140px;display:flex;flex-direction:column;justify-content:center}.status p{font-size:1.15rem;font-weight:600}
/* A focused, accessible link-entry panel shared by all YouTube tools. */
.url-field{padding:20px;border:1px solid var(--border);border-radius:16px;background:linear-gradient(115deg,#4f7cff0d,transparent 70%);gap:12px}
.url-field>span:first-child{font-size:1rem;font-weight:650}.url-input-row{display:flex;align-items:center;gap:12px;min-width:0;padding:7px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);transition:border-color .15s,box-shadow .15s}
.url-input-row:focus-within{border-color:#7895ff;box-shadow:0 0 0 3px #4f7cff26}.youtube-icon{display:grid;place-items:center;width:36px;height:26px;flex:none;background:#ee4141;color:white;border-radius:7px;font-size:13px}
.url-field .url-input-row input{flex:1;min-width:0;border:0;background:transparent;box-shadow:none;outline:none;padding:10px 0;font-size:1rem}.url-field .url-input-row input::placeholder{color:var(--muted);opacity:.8}
.url-field .url-clear{align-self:center;display:grid;place-items:center;width:32px;height:32px;flex:none;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:24px;cursor:pointer}.url-clear:hover{background:var(--surface);color:var(--text)}
.url-field .hint{margin:0;font-size:.84rem;line-height:1.6}.url-field p:empty{display:none}
@media(max-width:600px){.url-field{padding:14px}.url-input-row{gap:8px;padding:5px 8px}.youtube-icon{width:28px;height:23px}.url-field .url-input-row input{font-size:.9rem}}
.pdf-inspector{padding:18px;margin:16px 0;border:1px solid var(--border);border-radius:16px;background:var(--surface-2)}.pdf-preview-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px}.pdf-preview-card{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:8px;padding:12px;background:var(--surface);color:var(--text);border:2px solid transparent;border-radius:10px;min-width:0}.pdf-preview-card.selected{border-color:#6a8bff;background:#4f7cff16}.pdf-preview-card canvas{max-width:100%;height:auto;max-height:160px;object-fit:contain;background:white}.pdf-preview-card span{font-weight:600;font-size:.85rem}button.pdf-preview-card{cursor:pointer}.pdf-preview-card:hover{border-color:#6a8bff88}.pdf-range-builder,.pdf-pagination{display:flex;align-items:end;justify-content:center;gap:10px;flex-wrap:wrap;margin:15px 0}.pdf-range-builder label{display:flex;flex-direction:column;gap:6px;font-size:.85rem}.pdf-range-builder input{width:90px;border:1px solid var(--border);border-radius:8px;padding:9px;background:var(--surface);color:var(--text)}.pdf-pagination{align-items:center}.source-preview{margin:16px 0;text-align:center}.source-image-preview{max-width:100%;max-height:240px;border-radius:12px;object-fit:contain;background:var(--surface-2)}
@media(max-width:600px){.pdf-inspector{padding:12px}.pdf-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pdf-range-builder{justify-content:flex-start}}
.output-settings-title{max-width:800px;margin:24px auto 10px;font-size:1.05rem}.options.youtube-output-options{max-width:800px;margin:0 auto;padding:18px;border:1px solid var(--border);border-radius:14px;background:var(--surface-2);grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.youtube-output-options .field{min-width:0}.youtube-output-options select{min-height:46px}.youtube-output-options+.center+.actions{max-width:800px;margin:20px auto 0}.youtube-output-options+.center+.actions .btn-lg{min-width:240px}
@media(max-width:600px){.options.youtube-output-options{grid-template-columns:1fr;padding:14px}.output-settings-title{margin-top:18px}}

.youtube-info-card{display:flex;align-items:center;gap:20px;max-width:800px;margin:20px auto;padding:16px;border:1px solid var(--border);border-radius:16px;background:var(--surface);text-align:left}.youtube-info-card img{width:200px;aspect-ratio:16/9;object-fit:cover;border-radius:10px}.youtube-info-card h3{margin:0 0 8px;font-size:1.1rem;overflow-wrap:anywhere}.youtube-info-card p{margin:0}@media(max-width:600px){.youtube-info-card{flex-direction:column;align-items:stretch}.youtube-info-card img{width:100%}}

/* Shared editor layout: responsive controls, touch canvas, readable results. */
.studio-controls{border:0;padding:0;margin:0;min-width:0;display:grid;gap:18px}
.studio-controls:disabled{opacity:.65}
.studio .field{min-width:0}.studio input[type=file]{max-width:100%;padding:12px;border:1px dashed var(--border,#cbd5e1);border-radius:10px;background:var(--surface,#fff)}
.studio-canvas{display:block;width:100%;max-width:850px;max-height:none;object-fit:contain;height:auto;margin:12px auto;border:1px solid #cbd5e1;border-radius:8px;background:repeating-conic-gradient(#f1f5f9 0% 25%,#fff 0% 50%) 50% / 20px 20px;cursor:crosshair}
.studio-coordinates{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.studio-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.studio-signature{display:block;width:100%;max-width:700px;height:auto;background:#fff;border:2px dashed #94a3b8;border-radius:10px;cursor:crosshair}.studio-sign-box{display:grid;gap:10px}
.studio-point-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.studio-point-fields>div{display:grid;gap:8px}
.studio-diff{white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.8 ui-monospace,monospace;max-height:650px;overflow:auto;padding:18px;border:1px solid #cbd5e1;border-radius:10px;background:#f8fafc;color:#172554;text-align:start;unicode-bidi:plaintext}
.studio-diff ins{background:#dcfce7;color:#14532d;text-decoration:none;border-inline-start:3px solid #16a34a}.studio-diff del{background:#fee2e2;color:#7f1d1d}
.studio-filelist{padding-inline-start:24px}.studio-filelist li{display:flex;align-items:center;gap:8px;padding:8px;border-bottom:1px solid #ddd}.studio-filelist span{flex:1;overflow-wrap:anywhere}
.studio-cue{display:grid;grid-template-columns:30px 1fr 1fr auto;gap:8px;padding:12px 0;border-bottom:1px solid #ddd}.studio-cue textarea{grid-column:2/4;min-height:70px}.studio-cue button{grid-column:4;grid-row:1/3}
.studio .wc-text{width:100%;min-height:210px;box-sizing:border-box}.studio input,.studio select,.studio textarea{max-width:100%;box-sizing:border-box}
@media(max-width:640px){.studio-two{grid-template-columns:1fr}.studio-point-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-coordinates{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-cue{grid-template-columns:24px 1fr 1fr}.studio-cue button{grid-column:2/4;grid-row:auto}.studio-canvas{max-height:none}.studio .actions{flex-wrap:wrap}}

.download-ad-dialog{border:0;border-radius:16px;padding:28px;max-width:min(480px,90vw);box-shadow:0 20px 80px #0004}.download-ad-dialog::backdrop{background:#0f172a88}.download-ad-dialog p{line-height:1.7}.download-ad-dialog .actions{gap:12px;flex-wrap:wrap}

.extended-record-preview{display:block;max-width:100%;width:100%;max-height:420px;margin:1rem 0;border-radius:12px;background:#101827}.extended-palette{display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}.extended-palette>div{display:grid;gap:6px;text-align:center}.extended-palette span{display:block;width:72px;height:72px;border:1px solid #888;border-radius:12px}.studio textarea{max-width:100%;box-sizing:border-box}.studio .results>div{margin-bottom:16px}

/* Public tool facts and service information. */
.tool-answer{scroll-margin-top:9rem}.tool-answer:target{outline:2px solid var(--primary,#2563eb);outline-offset:3px}.answer-link{font-size:.9rem;overflow-wrap:anywhere}
.tool-facts{margin:2rem 0;padding:1.25rem;border:1px solid #dbe2ea;border-radius:14px;background:#f8fafc}
.tool-facts h2{margin-top:0}.tool-facts dl{margin:0}.tool-facts dl>div{display:grid;grid-template-columns:minmax(140px,1fr) 3fr;gap:1rem;padding:.8rem 0;border-bottom:1px solid #e2e8f0}.tool-facts dt{font-weight:650}.tool-facts dd{margin:0;overflow-wrap:anywhere}.tool-facts p:last-child{margin-bottom:0}.about-page{padding-top:1.5rem;padding-bottom:3rem}.service-info{margin-top:3rem}
@media(max-width:600px){.tool-facts dl>div{grid-template-columns:1fr;gap:.3rem}.tool-facts{padding:1rem}}

/* Keep explanatory content readable in the existing public light/dark themes. */
.tool-facts{background:var(--surface-2);border-color:var(--border)}.tool-facts dl>div{border-color:var(--border)}.guide-reviewed{color:var(--muted);margin-top:-.25rem}#category-guide{padding-block:20px}#category-guide td p{margin:.5rem 0 0}.tool-guide{scroll-margin-top:90px}
@media(max-width:600px){.tool-guide{scroll-margin-top:130px}.guide-table-wrap th[scope="row"]{width:40%}}
.youtube-mode-switch a[aria-current="page"]{background:var(--surface-2);border-color:var(--brand);color:var(--text);font-weight:700;box-shadow:inset 0 -3px 0 var(--brand)}

/* Segmented YouTube time entry: explicit units, with faint empty-mask digits. */
.selection-time-control,.selection-time-field{min-width:0;width:100%}
.selection-time-parts{display:grid;grid-template-columns:minmax(0,46px) 6px minmax(0,46px) 6px minmax(0,46px) 6px minmax(0,58px);align-items:end;gap:5px;direction:ltr;max-width:244px;width:100%;margin-inline:auto}
.selection-time-part{display:grid;gap:5px;min-width:0;margin:0;text-align:center}
.selection-time-part span{font-size:.66rem;color:var(--muted);font-weight:600;line-height:1.2;min-height:2.4em;overflow-wrap:anywhere}
.selection-time-part input,.field .selection-time-part input{box-sizing:border-box;min-width:0;width:100%;text-align:center;font:600 1rem ui-monospace,monospace;font-variant-numeric:tabular-nums;padding:8px 4px;letter-spacing:.02em}
.selection-time-part input::placeholder{color:var(--muted);opacity:.48;font-weight:400}
.selection-time-part input:focus{outline:2px solid var(--brand);outline-offset:2px}
.selection-time-separator{padding-bottom:8px;color:var(--muted);font:600 1rem ui-monospace,monospace}
.selection-time-readout{display:block;min-height:1.3em;margin-top:8px;font-size:.8rem;color:var(--muted);overflow-wrap:anywhere}
.selection-time-field[aria-invalid="true"] .selection-time-readout{color:var(--danger,#b91c1c)}
.selection-time-jog{display:flex;justify-content:flex-end;gap:8px;margin-top:6px;flex-wrap:wrap}
.selection-time-help{grid-column:1/-1;margin:0;color:var(--muted);font-size:.8rem;font-weight:400}
#tool:has(.trim-controls) .selection-time-help{display:none}
@media(max-width:480px){.selection-time-parts{gap:4px}.selection-time-part input,.field .selection-time-part input{font-size:1rem;padding:8px 3px}}

.selection-time-parts[data-hours="false"]{grid-template-columns:minmax(0,46px) 6px minmax(0,46px) 6px minmax(0,58px);max-width:182px}
.selection-time-parts>[hidden]{display:none}

/* Keep native reorder controls usable on narrow screens and in RTL rows. */
.files .file-reorder { display: flex; flex: none; gap: 4px; }
.files .file-move { min-width: 44px; min-height: 44px; }
.files .file-move:disabled { opacity: .35; cursor: default; }
.files li:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
.file-order-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) {
  .files li { gap: 6px; padding: 8px; }
  .files .thumb { width: 32px; height: 32px; }
  .files .fsize { display: none; }
}
