:root {
  --brand-950: #052b22;
  --brand-900: #073b2e;
  --brand-700: #0d5a45;
  --gold-500: #d4a62e;
  --gold-100: #fff5d4;
  --ink: #10221d;
  --muted: #5d6e68;
  --line: #d7e4de;
  --soft: #f2f8f5;
  --soft-strong: #e8f3ee;
  --white: #fff;
  --success: #146a43;
  --warning: #99690a;
  --danger: #a83232;
  --shadow: 0 18px 45px rgba(5, 43, 34, .09);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shell: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--brand-700); text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button, label[for], summary { cursor: pointer; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #f2cc5d; outline-offset: 3px; }
.shell { width: min(var(--shell), calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; border-radius: 8px; color: var(--brand-950); background: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.site-header { position: sticky; z-index: 50; top: 0; color: white; background: rgba(5, 43, 34, .97); border-bottom: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(16px); }
.nav { min-height: 76px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; font-family: Georgia, "Times New Roman", serif; font-size: 20px; white-space: nowrap; }
.brand img { border-radius: 50%; }
.brand strong { font-weight: 700; }
.desktop-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.desktop-nav a { color: rgba(255,255,255,.8); font-size: 14px; font-weight: 650; }
.desktop-nav a:hover { color: white; }
.header-search, .hero-search, .directory-search { position: relative; display: flex; align-items: center; }
.header-search { width: 250px; }
.header-search > .icon, .hero-search > .icon, .directory-search > .icon { position: absolute; z-index: 1; right: 13px; width: 19px; pointer-events: none; }
[data-tool-search] { width: 100%; min-height: 44px; padding: 0 43px 0 14px; border: 1px solid #aabdb5; border-radius: 8px; background: white; font-size: 14px; }
.search-results { position: absolute; z-index: 70; top: calc(100% + 8px); left: 0; right: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); color: var(--ink); }
.search-results a { padding: 10px; display: flex; justify-content: space-between; gap: 10px; border-radius: 8px; color: var(--ink); }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--soft); }
.search-results strong, .search-results small { display: block; }
.search-results small { color: var(--muted); font-size: 12px; }
.search-empty { padding: 12px; margin: 0; color: var(--muted); font-size: 13px; }
.menu-button { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; color: white; background: transparent; }
.mobile-navigation { padding: 8px 20px 16px; border-top: 1px solid rgba(255,255,255,.1); }
.mobile-navigation a { max-width: var(--shell); margin: auto; padding: 12px; display: block; color: rgba(255,255,255,.85); }

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(42px, 6vw, 68px); }
h2 { font-size: clamp(25px, 3vw, 34px); }
p { margin-top: 0; }
.home-hero { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff 0%, #fff 72%, #fbfdfc 100%); }
.hero-inner { padding: 82px 0 58px; text-align: center; }
.hero-inner > p { max-width: 670px; margin: 18px auto 30px; color: var(--muted); font-size: 19px; }
.hero-search { max-width: 720px; margin: auto; }
.hero-search [data-tool-search], .directory-search [data-tool-search] { min-height: 58px; padding-inline: 20px 54px; border: 1.5px solid var(--brand-700); border-radius: 10px; font-size: 16px; box-shadow: 0 8px 20px rgba(5,43,34,.05); }
.hero-search > .icon, .directory-search > .icon { right: 18px; width: 23px; height: 23px; }
.phrase-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.phrase-cloud span { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--brand-900); font-size: 13px; }
.phrase-cloud-hero { justify-content: center; margin-top: 24px; }
.content-note { margin-top: 14px; color: var(--muted); font-size: 14px; }
.quick-links { max-width: 760px; margin: 24px auto 0; display: flex; justify-content: center; gap: 16px 44px; flex-wrap: wrap; }
.quick-links a { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 14px; font-weight: 650; }
.quick-links span { color: var(--gold-500); display: inline-flex; }

.section { padding: 70px 0; }
.section-heading { margin-bottom: 28px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-heading h2 { font-size: 27px; }
.section-heading p { margin: 8px 0 0; color: var(--muted); }
.section-heading > a { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 750; white-space: nowrap; }
.section-heading > a .icon { width: 17px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-card { min-height: 126px; padding: 22px; display: grid; grid-template-columns: 46px 1fr auto; align-items: start; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: white; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.tool-card:hover { border-color: #a9c5b9; box-shadow: var(--shadow); transform: translateY(-2px); }
.tool-icon, .category-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; color: var(--brand-900); background: var(--soft); }
.tool-card:nth-child(even) .tool-icon { color: #9a6f08; background: var(--gold-100); }
.tool-card strong, .tool-card small { display: block; }
.tool-card strong { margin: 1px 0 6px; font-size: 17px; }
.tool-card small { color: var(--muted); line-height: 1.45; }
.tool-card .arrow, .category-card .arrow { align-self: center; width: 18px; }
.categories-section { padding-top: 12px; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.category-grid-large { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.category-card { min-height: 88px; padding: 17px 18px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.category-card:hover { border-color: #a9c5b9; background: var(--soft); }
.category-icon { width: 44px; height: 44px; background: white; border: 1px solid var(--line); }
.category-card strong, .category-card small { display: block; }
.category-card small { color: var(--muted); }
.trust-band { background: var(--soft); border-block: 1px solid var(--line); }
.trust-grid { min-height: 150px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 70px; }
.trust-grid > div { display: grid; grid-template-columns: 54px 1fr; gap: 19px; align-items: center; }
.trust-grid > div > .icon { width: 50px; height: 50px; color: var(--brand-900); stroke-width: 1.4; }
.trust-grid h2 { font-size: 20px; letter-spacing: -.02em; }
.trust-grid p { margin: 5px 0 0; color: var(--muted); }
.recent-section { display: grid; grid-template-columns: 1.5fr .7fr; gap: 30px; }
.recent-section h2 { margin-bottom: 20px; font-size: 26px; }
.recent-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.recent-list > a { padding: 15px 18px; display: grid; grid-template-columns: 1fr auto 20px; align-items: center; gap: 18px; color: var(--ink); border-bottom: 1px solid var(--line); }
.recent-list > a:last-child { border-bottom: 0; }
.recent-list > a:hover { background: var(--soft); }
.recent-list > a > span { display: flex; align-items: center; gap: 13px; }
.recent-list strong, .recent-list small { display: block; }
.recent-list small, .recent-list time { color: var(--muted); font-size: 12px; }
.release-meta { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.release-label { padding: 4px 7px; border: 1px solid #bed5cb; border-radius: 999px; color: var(--brand-700); background: var(--soft); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.recent-section aside { padding: 30px; align-self: end; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.recent-section aside h2 { font-size: 23px; }
.recent-section aside p { color: var(--muted); }
.button, .secondary-button, .text-button { min-height: 46px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 9px; font-size: 14px; font-weight: 750; }
.button { border: 1px solid var(--brand-900); color: white; background: var(--brand-900); }
.button:hover { background: var(--brand-950); }
.secondary-button { border: 1px solid var(--brand-900); color: var(--brand-900); background: white; }
.text-button { min-height: 40px; padding-inline: 8px; border: 0; color: var(--brand-700); background: transparent; }

.page-hero { padding: 64px 0 34px; }
.page-hero h1 { margin-top: 22px; font-size: clamp(40px, 5vw, 58px); }
.page-hero > p { max-width: 700px; margin: 14px 0 0; color: var(--muted); font-size: 18px; }
.directory-search { max-width: 640px; margin-top: 30px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; color: var(--muted); font-size: 13px; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: #9baaa4; }
.eyebrow-row { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px 16px; color: var(--muted); font-size: 13px; }
.eyebrow-link a { color: var(--brand-700); font-weight: 700; }
.tool-title-row { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tool-heading .tool-title-row h1 { margin-top: 0; }
.favorite-button { min-height: 44px; padding: 0 15px; display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 9px; color: var(--brand-900); background: white; font-size: 13px; font-weight: 750; }
.favorite-button .icon { width: 19px; }
.favorite-button:hover, .favorite-button.is-favorite { border-color: #cfae56; background: var(--gold-100); }
.favorite-button.is-favorite .icon { fill: var(--gold-500); }
.article-page { max-width: 820px; padding: 20px 0 100px; }
.article-page h2 { margin: 44px 0 12px; }
.article-page p { color: var(--muted); font-size: 17px; }
.content-split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.content-panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 10px 30px rgba(5,43,34,.04); }
.content-list { margin: 16px 0 0; padding-left: 20px; }
.content-list li + li { margin-top: 10px; }
.category-context { padding-top: 14px; }
.personal-tools { padding-top: 24px; display: grid; gap: 64px; }
.personal-tool-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.personal-tool-list:empty { display: none; }
.personal-tool-row { min-height: 88px; padding: 16px 20px; display: grid; grid-template-columns: 1fr auto 20px; align-items: center; gap: 20px; color: var(--ink); border-bottom: 1px solid var(--line); }
.personal-tool-row:last-child { border-bottom: 0; }
.personal-tool-row:hover { background: var(--soft); }
.personal-tool-row strong, .personal-tool-row small { display: block; }
.personal-tool-row small { margin-top: 4px; color: var(--muted); }
.personal-tool-row em { color: var(--muted); font-size: 12px; font-style: normal; }
.personal-empty { padding: 44px 24px; border: 1px dashed #b8cbc2; border-radius: var(--radius); background: #fbfdfc; text-align: center; }
.personal-empty[hidden] { display: none; }
.personal-empty > .icon { width: 34px; height: 34px; margin-bottom: 14px; color: var(--brand-700); }
.personal-empty h3 { margin: 0; font-size: 20px; }
.personal-empty p { margin: 8px 0 20px; color: var(--muted); }

.tool-page { padding: 42px 0 96px; }
.tool-heading { margin-bottom: 26px; }
.tool-heading h1 { margin-top: 22px; font-size: clamp(38px, 5vw, 56px); }
.tool-heading > p { max-width: 760px; margin: 12px 0 0; color: var(--muted); font-size: 18px; }
.tool-workspace { padding: 22px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: 0 10px 30px rgba(5,43,34,.05); }
.drop-zone { min-height: 380px; padding: 38px 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed #b7cbc2; border-radius: var(--radius); background: #fbfdfc; text-align: center; transition: border-color .2s ease, background .2s ease; }
.drop-zone.is-dragging { border-color: var(--gold-500); background: var(--gold-100); }
.upload-icon { width: 70px; height: 70px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 50%; color: var(--brand-900); background: var(--soft-strong); }
.upload-icon .icon { width: 35px; height: 35px; }
.drop-zone h2 { font-size: 21px; }
.drop-zone > p { margin: 6px 0 12px; color: var(--muted); }
.drop-zone small { margin-top: 9px; color: var(--muted); }
.privacy-note { margin-top: 22px !important; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.privacy-note .icon { width: 17px; }
.compressor-settings { padding: 30px 20px; border-left: 1px solid var(--line); }
.compressor-settings label { margin: 0 0 9px; display: flex; justify-content: space-between; font-weight: 750; }
.compressor-settings input[type="range"] { width: 100%; accent-color: var(--gold-500); }
.compressor-settings select { width: 100%; min-height: 48px; margin-bottom: 25px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.range-labels { margin: 2px 0 28px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.setting-help { color: var(--muted); font-size: 13px; }
.status-message { margin-top: 16px; padding: 14px 16px; border: 1px solid #a8cfbb; border-radius: 10px; color: var(--success); background: #edf8f1; }
.status-message[data-state="error"] { color: var(--danger); border-color: #e7b4b4; background: #fff1f1; }
.status-message.compact { margin-top: 12px; }
.ad-slot { min-height: 64px; margin: 22px 0; display: grid; place-items: center; border: 1px dashed #cbd8d2; color: #87958f; background: #fbfcfc; font-size: 12px; }
.compression-result { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.result-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.result-heading h2 { font-size: 25px; }
.result-heading p { margin: 5px 0 0; color: var(--muted); }
.comparison { margin: 20px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comparison figure { margin: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--soft); }
.comparison figcaption { padding: 12px 14px; display: flex; justify-content: space-between; gap: 14px; background: white; }
.comparison figcaption span { color: var(--muted); font-size: 13px; }
.comparison img { width: 100%; height: 300px; display: block; object-fit: contain; }
.download-button { width: 100%; }
.download-button .icon { width: 19px; }
.tool-content-grid { margin-top: 60px; display: grid; grid-template-columns: 1fr 340px; align-items: start; gap: 60px; }
.content-section { padding: 36px 0; border-bottom: 1px solid var(--line); }
.content-section:first-child { padding-top: 0; }
.content-section h2 { margin-bottom: 14px; font-size: 28px; }
.content-section p, .content-section li { color: var(--muted); }
.content-section li { margin-bottom: 8px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 18px 30px 18px 0; font-weight: 750; }
.faq-list p { padding: 0 22px 18px 0; }
.related-tools { position: sticky; top: 108px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.related-tools h2 { margin-bottom: 10px; font-size: 20px; }
.related-tools a { padding: 13px 0; display: grid; grid-template-columns: 24px 1fr 18px; align-items: center; gap: 10px; color: var(--ink); border-bottom: 1px solid var(--line); }
.related-tools a:last-child { border-bottom: 0; }
.related-tools a .icon:last-child { width: 17px; }

.word-workspace { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(5,43,34,.05); }
.stat-grid { margin-bottom: 22px; display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat-grid > div { min-height: 92px; padding: 15px 10px; display: grid; place-content: center; text-align: center; border-right: 1px solid var(--line); background: var(--soft); }
.stat-grid > div:last-child { border-right: 0; }
.stat-grid strong { font-size: 24px; color: var(--brand-900); }
.stat-grid span { color: var(--muted); font-size: 12px; }
.word-workspace > label { margin-bottom: 9px; display: block; font-weight: 750; }
.word-workspace textarea { width: 100%; min-height: 330px; padding: 18px; resize: vertical; border: 1px solid #b8c9c1; border-radius: 10px; line-height: 1.7; }
.editor-actions { margin-top: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.editor-actions p { margin: 0 auto 0 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.editor-actions p .icon { width: 17px; }

.pdf-merger-workspace { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: 0 10px 30px rgba(5,43,34,.05); }
.pdf-toolbar { display: flex; align-items: center; gap: 10px; }
.pdf-toolbar .icon { width: 18px; }
.pdf-summary { margin: 0 0 0 auto; color: var(--muted); font-size: 13px; }
.pdf-drop-zone { min-height: 330px; margin-top: 18px; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed #b7cbc2; border-radius: var(--radius); background: #fbfdfc; text-align: center; transition: border-color .2s ease, background .2s ease; }
.pdf-drop-zone[hidden], .pdf-organizer[hidden], .pdf-result[hidden] { display: none; }
.pdf-drop-zone.is-dragging { border-color: var(--gold-500); background: var(--gold-100); }
.pdf-drop-zone h2 { font-size: 22px; }
.pdf-drop-zone p { margin: 7px 0 17px; color: var(--muted); }
.pdf-drop-zone small { margin-top: 14px; color: var(--muted); }
.pdf-organizer { margin-top: 18px; }
.pdf-organizer-help { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.pdf-page-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pdf-page-card { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: white; transition: border-color .18s ease, box-shadow .18s ease, opacity .18s ease; }
.pdf-page-card[draggable="true"] { cursor: grab; }
.pdf-page-card.is-dragging { opacity: .45; }
.pdf-page-card.is-drop-target { border-color: var(--gold-500); box-shadow: 0 0 0 2px var(--gold-100); }
.pdf-page-card-head { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.pdf-page-card-head .icon { width: 16px; }
.pdf-page-number { color: var(--ink); font-weight: 800; }
.pdf-thumbnail { height: 220px; margin: 8px 0 10px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }
.pdf-thumbnail canvas { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; box-shadow: 0 3px 12px rgba(5,43,34,.08); transition: transform .2s ease; }
.pdf-page-meta strong, .pdf-page-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-page-meta strong { font-size: 13px; }
.pdf-page-meta small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.pdf-page-actions { margin-top: 9px; display: grid; grid-template-columns: repeat(4, 34px); justify-content: space-between; gap: 4px; }
.pdf-icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; color: var(--brand-900); background: transparent; }
.pdf-icon-button:hover:not(:disabled), .pdf-icon-button:focus-visible { border-color: var(--line); background: var(--soft); }
.pdf-icon-button:disabled { opacity: .3; }
.pdf-icon-button .icon { width: 17px; height: 17px; }
.pdf-output-row { margin-top: 18px; display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 18px; }
.pdf-output-row label { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.pdf-output-row input { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid #aabdb5; border-radius: 9px; }
.pdf-merge-button { width: 100%; min-height: 48px; }
.pdf-merge-button .icon { width: 19px; }
.pdf-organizer > .privacy-note { margin: 12px 0 0 !important; color: var(--muted); }
.pdf-result { margin-top: 16px; padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #98c4ad; border-radius: 11px; background: #f1f9f5; }
.pdf-result > div { display: flex; align-items: center; gap: 13px; }
.pdf-result > div > .icon { width: 33px; height: 33px; color: var(--success); }
.pdf-result strong, .pdf-result small { display: block; }
.pdf-result small { margin-top: 3px; color: var(--muted); }
.pdf-result .button { flex: 0 0 auto; }

.split-pdf-workspace { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: 0 10px 30px rgba(5,43,34,.05); }
.split-layout { margin-top: 18px; display: grid; grid-template-columns: 320px 1fr; gap: 18px; }
.split-sidebar, .split-main { min-width: 0; }
.split-sidebar { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdfc; }
.split-mode-group { margin: 0; padding: 0; border: 0; }
.split-mode-group legend { margin-bottom: 12px; padding: 0; font-weight: 800; }
.split-mode-option { margin-bottom: 10px; padding: 14px; display: grid; grid-template-columns: 18px 1fr; gap: 12px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.split-mode-option input { margin-top: 2px; accent-color: var(--brand-900); }
.split-mode-option strong, .split-mode-option small { display: block; }
.split-mode-option small { margin-top: 4px; color: var(--muted); }
.split-range-panel { margin-top: 16px; }
.split-range-panel label, .split-output-label { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.split-range-panel input, .split-output-label input { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid #aabdb5; border-radius: 9px; background: white; }
.split-output-label { margin-top: 16px; }
.split-run-button { width: 100%; margin-top: 16px; min-height: 48px; }
.split-run-button .icon { width: 19px; }
.split-main { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.split-page-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.split-page-card { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: white; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.split-page-card.is-selected { border-color: #cfae56; box-shadow: 0 0 0 2px var(--gold-100); }
.split-page-toggle { width: 100%; margin-bottom: 8px; padding: 0; display: flex; align-items: center; gap: 8px; border: 0; color: var(--ink); background: transparent; text-align: left; }
.split-page-toggle:disabled { cursor: default; }
.split-page-check { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; color: white; background: white; font-size: 13px; font-weight: 800; }
.split-page-card.is-selected .split-page-check { border-color: #cfae56; color: var(--brand-950); background: var(--gold-100); }
.split-page-number { color: var(--muted); font-size: 12px; font-weight: 800; }
.split-page-meta strong, .split-page-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-page-meta strong { font-size: 13px; }
.split-page-meta small { margin-top: 3px; color: var(--muted); font-size: 11px; }

.jpg-pdf-workspace { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: 0 10px 30px rgba(5,43,34,.05); }
.jpg-pdf-layout { margin-top: 18px; display: grid; grid-template-columns: 320px 1fr; gap: 18px; }
.jpg-pdf-sidebar, .jpg-pdf-main { min-width: 0; }
.jpg-pdf-sidebar { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdfc; }
.jpg-pdf-setting { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.jpg-pdf-setting + .jpg-pdf-setting { margin-top: 14px; }
.jpg-pdf-setting select, .jpg-pdf-setting input { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid #aabdb5; border-radius: 9px; background: white; }
.jpg-pdf-run { width: 100%; margin-top: 16px; min-height: 48px; }
.jpg-pdf-run .icon { width: 19px; }
.jpg-pdf-main { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.jpg-pdf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.jpg-pdf-card { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: white; transition: border-color .18s ease, box-shadow .18s ease, opacity .18s ease; }
.jpg-pdf-card[draggable="true"] { cursor: grab; }
.jpg-pdf-card.is-dragging { opacity: .45; }
.jpg-pdf-card.is-drop-target { border-color: var(--gold-500); box-shadow: 0 0 0 2px var(--gold-100); }
.jpg-pdf-card-head { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.jpg-pdf-card-head .icon { width: 16px; }
.jpg-pdf-number { color: var(--ink); font-weight: 800; }
.jpg-pdf-preview { aspect-ratio: 4 / 5; margin: 8px 0 10px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }
.jpg-pdf-preview img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; object-fit: contain; }
.jpg-pdf-meta strong, .jpg-pdf-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jpg-pdf-meta strong { font-size: 13px; }
.jpg-pdf-meta small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.jpg-pdf-actions { margin-top: 9px; display: grid; grid-template-columns: repeat(3, 34px); justify-content: space-between; gap: 4px; }

.pdf-jpg-workspace { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: 0 10px 30px rgba(5,43,34,.05); }
.pdf-jpg-layout { margin-top: 18px; display: grid; grid-template-columns: 320px 1fr; gap: 18px; }
.pdf-jpg-sidebar, .pdf-jpg-main { min-width: 0; }
.pdf-jpg-sidebar { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdfc; }
.pdf-jpg-setting { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.pdf-jpg-setting select { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid #aabdb5; border-radius: 9px; background: white; }
.pdf-jpg-run { width: 100%; margin-top: 16px; min-height: 48px; }
.pdf-jpg-run .icon { width: 19px; }
.pdf-jpg-main { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }

.rotate-pdf-workspace { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: 0 10px 30px rgba(5,43,34,.05); }
.rotate-layout { margin-top: 18px; display: grid; grid-template-columns: 320px 1fr; gap: 18px; }
.rotate-sidebar, .rotate-main { min-width: 0; }
.rotate-sidebar { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdfc; }
.rotate-heading { display: block; margin-bottom: 11px; }
.rotate-all-actions { display: grid; grid-template-columns: 1fr; gap: 9px; }
.rotate-all-actions .secondary-button { width: 100%; min-height: 44px; }
.rotate-run { width: 100%; min-height: 48px; margin-top: 16px; }
.rotate-main { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.rotate-card-actions { margin-top: 9px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.rotate-card-actions button { min-height: 38px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; color: var(--brand-900); background: var(--soft); font-size: 12px; font-weight: 800; }
.rotate-card-actions button:hover, .rotate-card-actions button:focus-visible { border-color: #cfae56; background: var(--gold-100); }
.rotate-preview canvas { transition: transform .2s ease; }

.resizer-workspace { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: 0 10px 30px rgba(5,43,34,.05); }
.resizer-drop { min-height: 360px; padding: 30px; display: grid; place-items: center; align-content: center; gap: 10px; border: 2px dashed #abc2b8; border-radius: var(--radius); background: var(--soft); text-align: center; }
.resizer-drop[hidden], .resizer-editor[hidden] { display: none; }
.resizer-drop.is-dragging { border-color: var(--gold-500); background: var(--gold-100); }
.resizer-drop h2, .resizer-drop p { margin: 0; }
.resizer-editor { display: grid; grid-template-columns: 340px 1fr; gap: 18px; }
.resizer-settings, .resizer-preview-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.resizer-settings { background: #fbfdfc; }
.resizer-source strong, .resizer-source small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resizer-source small { margin-top: 4px; color: var(--muted); }
.resizer-dimensions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.resizer-dimensions label, .resizer-setting { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.resizer-dimensions input, .resizer-setting select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #aabdb5; border-radius: 9px; background: white; }
.resizer-lock { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.resizer-lock input { accent-color: var(--brand-900); }
.resizer-presets { margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border: 0; }
.resizer-presets legend { margin-bottom: 7px; padding: 0; font-size: 13px; font-weight: 750; }
.resizer-presets button { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; color: var(--brand-900); background: white; font-weight: 800; }
.resizer-presets button:hover, .resizer-presets button:focus-visible { border-color: #cfae56; background: var(--gold-100); }
.resizer-setting { margin-top: 16px; }
.resizer-setting output { justify-self: end; margin-top: -24px; color: var(--muted); }
.resizer-run, .resizer-reset { width: 100%; margin-top: 14px; }
.resizer-preview-panel { display: grid; place-items: center; background: white; }
.resizer-preview-panel figure { width: 100%; margin: 0; }
.resizer-preview-panel img { width: 100%; height: 390px; display: block; object-fit: contain; border-radius: 10px; background: var(--soft); }
.resizer-preview-panel figcaption { margin-top: 10px; display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 13px; }
.resizer-preview-panel figcaption strong { color: var(--ink); }

.crop-workspace { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: 0 10px 30px rgba(5,43,34,.05); }
.crop-editor { display: grid; grid-template-columns: 340px 1fr; gap: 18px; }
.crop-editor[hidden], .crop-workspace .resizer-drop[hidden] { display: none; }
.crop-settings, .crop-stage-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.crop-settings { background: #fbfdfc; }
.crop-ratios { margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border: 0; }
.crop-ratios legend { margin-bottom: 7px; padding: 0; font-size: 13px; font-weight: 750; }
.crop-ratios button { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; color: var(--brand-900); background: white; font-size: 12px; font-weight: 800; }
.crop-ratios button[aria-pressed="true"] { border-color: #cfae56; background: var(--gold-100); }
.crop-values { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crop-values label { display: grid; gap: 6px; font-size: 12px; font-weight: 750; }
.crop-values input { width: 100%; min-height: 44px; padding: 0 11px; border: 1px solid #aabdb5; border-radius: 8px; }
.crop-run, .crop-reset { width: 100%; margin-top: 14px; }
.crop-stage-panel { background: white; }
.crop-stage { position: relative; width: 100%; height: 430px; overflow: hidden; border-radius: 11px; background: #e9f0ed; touch-action: none; }
.crop-stage > img { width: 100%; height: 100%; display: block; object-fit: contain; user-select: none; pointer-events: none; }
.crop-shade { position: absolute; border: 2px solid #f0c85d; border-radius: 4px; box-shadow: 0 0 0 9999px rgba(3,31,25,.56); cursor: move; }
.crop-shade::before, .crop-shade::after { content: ""; position: absolute; background: rgba(255,255,255,.65); }
.crop-shade::before { left: 33.333%; top: 0; bottom: 0; width: 1px; box-shadow: calc(33.333% + 1px) 0 0 rgba(255,255,255,.65); }
.crop-shade::after { top: 33.333%; left: 0; right: 0; height: 1px; box-shadow: 0 calc(33.333% + 1px) 0 rgba(255,255,255,.65); }
.crop-stage-meta { margin: 10px 0 0; color: var(--muted); font-size: 13px; text-align: right; }

.pdf-sign-workspace { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: 0 10px 30px rgba(5,43,34,.05); }
.sign-layout[hidden] { display: none; }
.sign-editor[hidden] { display: none; }
.sign-editor { margin-top: 18px; display: grid; grid-template-columns: 320px 1fr; gap: 18px; }
.sign-capture-panel, .sign-stage-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.sign-capture-panel { background: #fbfdfc; }
.sign-stage-panel { background: white; }
.sign-draw-canvas { display: block; width: 100%; height: 140px; margin-top: 12px; border: 1px dashed #aabdb5; border-radius: 9px; background: white; touch-action: none; cursor: crosshair; }
[data-sign-type-panel] label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 750; }
[data-sign-type-panel] input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #aabdb5; border-radius: 9px; }
.sign-position-controls { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.sign-position-controls[hidden] { display: none; }
.sign-position-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sign-position-grid label { display: grid; gap: 6px; font-size: 12px; font-weight: 750; }
.sign-position-grid input { width: 100%; min-height: 40px; padding: 0 9px; border: 1px solid #aabdb5; border-radius: 8px; }
.sign-run-button { width: 100%; margin-top: 14px; }
.sign-stage { height: 460px; }
.sign-overlay[hidden] { display: none; }

.qr-workspace, .barcode-workspace, .json-workspace { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: 0 10px 30px rgba(5,43,34,.05); }
.json-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.json-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdfc; }
.json-panel-head { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.json-panel-head h2 { margin: 0; font-size: 15px; }
.json-panel-head select { min-height: 38px; padding: 0 10px; border: 1px solid #aabdb5; border-radius: 8px; background: white; font-size: 12px; }
.json-panel-head .qr-type-tabs { grid-template-columns: repeat(2, auto); }
.json-panel textarea { width: 100%; min-height: 320px; padding: 12px; border: 1px solid #aabdb5; border-radius: 9px; background: white; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; resize: vertical; }
.json-panel textarea[readonly] { background: var(--soft); }
.json-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.json-actions [aria-disabled="true"] { opacity: .5; pointer-events: none; }
.case-buttons { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.case-buttons button[aria-pressed="true"] { border-color: #cfae56; background: var(--gold-100); }
.qr-layout { display: grid; grid-template-columns: 340px 1fr; gap: 18px; }
.qr-settings, .qr-preview-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.qr-settings { background: #fbfdfc; }
.qr-type-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.qr-type-tab { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; color: var(--brand-900); background: white; font-size: 12px; font-weight: 800; }
.qr-type-tab[aria-selected="true"] { border-color: #cfae56; background: var(--gold-100); }
.qr-fields { margin-top: 16px; display: grid; gap: 10px; }
.qr-fields[hidden] { display: none; }
.qr-fields label { display: grid; gap: 6px; font-size: 13px; font-weight: 750; }
.qr-fields input, .qr-fields select, .qr-fields textarea { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #aabdb5; border-radius: 9px; background: white; font: inherit; }
.qr-fields textarea { min-height: 96px; padding: 10px 12px; resize: vertical; }
.qr-style-settings { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.qr-style-settings > label { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.qr-style-settings select { min-height: 46px; padding: 0 12px; border: 1px solid #aabdb5; border-radius: 9px; background: white; }
.qr-style-settings output { justify-self: end; margin-top: -24px; color: var(--muted); }
.qr-color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qr-color-row label { display: grid; gap: 6px; font-size: 13px; font-weight: 750; }
.qr-color-row input[type="color"] { width: 100%; min-height: 44px; padding: 3px; border: 1px solid #aabdb5; border-radius: 9px; background: white; }
.qr-preview-panel { display: grid; align-content: start; justify-items: center; gap: 14px; background: white; }
.qr-preview-card { display: grid; place-items: center; width: 100%; min-height: 320px; padding: 20px; border-radius: 10px; background: var(--soft); }
.qr-preview-card canvas { max-width: 100%; height: auto; border-radius: 6px; background: white; }
.qr-preview-meta { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.qr-actions [aria-disabled="true"] { opacity: .5; pointer-events: none; }

.site-footer { padding: 48px 0; color: rgba(255,255,255,.7); background: var(--brand-950); }
.footer-layout { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; }
.footer-layout nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 22px; }
.footer-layout nav a { color: rgba(255,255,255,.75); font-size: 13px; }
.footer-layout > p { grid-column: 1/-1; margin: 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; }

@media (max-width: 900px) {
  .desktop-nav, .header-search { display: none; }
  .nav { justify-content: space-between; }
  .menu-button { display: inline-flex; }
  .tool-content-grid { grid-template-columns: 1fr 280px; gap: 35px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid > div:nth-child(3) { border-right: 0; }
  .stat-grid > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .pdf-page-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split-layout { grid-template-columns: 1fr; }
  .split-page-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jpg-pdf-layout { grid-template-columns: 1fr; }
  .jpg-pdf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pdf-jpg-layout { grid-template-columns: 1fr; }
  .rotate-layout { grid-template-columns: 1fr; }
  .resizer-editor { grid-template-columns: 300px 1fr; }
  .crop-editor { grid-template-columns: 300px 1fr; }
  .qr-layout { grid-template-columns: 300px 1fr; }
  .json-layout { grid-template-columns: 1fr; }
  .sign-editor { grid-template-columns: 280px 1fr; }
}

@media (max-width: 720px) {
  .shell { width: min(var(--shell), calc(100% - 28px)); }
  .nav { min-height: 68px; }
  .brand { font-size: 18px; }
  .brand img { width: 38px; height: 38px; }
  .hero-inner { padding: 54px 0 38px; }
  .hero-inner h1 { max-width: 430px; margin: auto; font-size: 43px; }
  .hero-inner > p { font-size: 16px; }
  .phrase-cloud span { width: 100%; text-align: center; }
  .quick-links { align-items: stretch; flex-direction: column; gap: 0; text-align: left; }
  .quick-links a { padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .quick-links a::after { content: "›"; margin-left: auto; font-size: 21px; }
  .section { padding: 52px 0; }
  .section-heading { align-items: start; }
  .section-heading p { display: none; }
  .content-split { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 92px; padding: 16px; }
  .category-grid, .category-grid-large { grid-template-columns: 1fr 1fr; }
  .category-card { min-height: 110px; padding: 14px; grid-template-columns: 1fr auto; }
  .category-card .category-icon { grid-column: 1; }
  .category-card > span:nth-child(2) { grid-column: 1; }
  .category-card .arrow { grid-column: 2; grid-row: 1 / 3; }
  .trust-grid { padding: 30px 0; grid-template-columns: 1fr; gap: 30px; }
  .recent-section { grid-template-columns: 1fr; }
  .recent-list time { display: none; }
  .page-hero { padding-top: 42px; }
  .tool-page { padding-top: 28px; }
  .tool-heading h1 { font-size: 39px; }
  .tool-title-row { align-items: flex-start; flex-direction: column; }
  .tool-workspace { padding: 14px; grid-template-columns: 1fr; }
  .drop-zone { min-height: 330px; }
  .compressor-settings { padding: 22px 10px 10px; border-left: 0; border-top: 1px solid var(--line); }
  .comparison { grid-template-columns: 1fr; }
  .comparison img { height: 230px; }
  .tool-content-grid { grid-template-columns: 1fr; gap: 36px; }
  .related-tools { position: static; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .stat-grid > div:nth-child(even) { border-right: 0; }
  .stat-grid > div:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .editor-actions { align-items: stretch; flex-wrap: wrap; }
  .editor-actions p { width: 100%; }
  .pdf-merger-workspace { padding: 14px; }
  .pdf-toolbar { align-items: stretch; flex-wrap: wrap; }
  .pdf-toolbar .button, .pdf-toolbar .secondary-button { flex: 1; padding-inline: 11px; }
  .pdf-summary { width: 100%; margin: 4px 0 0; text-align: right; }
  .pdf-drop-zone { min-height: 300px; }
  .pdf-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .pdf-page-card { padding: 8px; }
  .pdf-thumbnail { height: 200px; }
  .pdf-page-actions { grid-template-columns: repeat(4, 36px); }
  .pdf-icon-button { width: 36px; height: 36px; }
  .pdf-output-row { grid-template-columns: 1fr; gap: 12px; }
  .pdf-result { align-items: stretch; flex-direction: column; }
  .pdf-result .button { width: 100%; }
  .split-pdf-workspace { padding: 14px; }
  .split-sidebar, .split-main { padding: 14px; }
  .split-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .jpg-pdf-workspace { padding: 14px; }
  .jpg-pdf-sidebar, .jpg-pdf-main { padding: 14px; }
  .jpg-pdf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .pdf-jpg-workspace { padding: 14px; }
  .pdf-jpg-sidebar, .pdf-jpg-main { padding: 14px; }
  .rotate-pdf-workspace { padding: 14px; }
  .rotate-sidebar, .rotate-main { padding: 14px; }
  .resizer-workspace { padding: 14px; }
  .resizer-editor { grid-template-columns: 1fr; }
  .resizer-settings, .resizer-preview-panel { padding: 14px; }
  .resizer-preview-panel img { height: 280px; }
  .crop-workspace { padding: 14px; }
  .crop-editor { grid-template-columns: 1fr; }
  .crop-settings, .crop-stage-panel { padding: 14px; }
  .crop-stage { height: 330px; }
  .qr-workspace, .barcode-workspace, .json-workspace, .pdf-sign-workspace { padding: 14px; }
  .sign-editor { grid-template-columns: 1fr; }
  .sign-capture-panel, .sign-stage-panel { padding: 14px; }
  .sign-stage { height: 340px; }
  .json-panel { padding: 14px; }
  .json-panel textarea { min-height: 220px; }
  .qr-layout { grid-template-columns: 1fr; }
  .qr-settings, .qr-preview-panel { padding: 14px; }
  .qr-preview-card { min-height: 260px; padding: 14px; }
  .footer-layout { grid-template-columns: 1fr; }
  .footer-layout nav { justify-content: flex-start; }
  .footer-layout > p { grid-column: 1; }
}

@media (max-width: 430px) {
  .tool-card small { font-size: 12px; }
  .category-grid { gap: 9px; }
  .category-card { padding: 12px; }
  .word-workspace { padding: 14px; }
  .stat-grid strong { font-size: 21px; }
  .stat-grid span { font-size: 11px; }
  .result-heading { align-items: flex-start; flex-direction: column; }
  .personal-tool-row { grid-template-columns: 1fr 18px; gap: 12px; }
  .personal-tool-row em { grid-column: 1; grid-row: 2; }
  .pdf-thumbnail { height: 170px; }
  body[data-tool-slug="merge-pdf"] .tool-title-row { align-items: center; flex-direction: row; }
  body[data-tool-slug="split-pdf"] .tool-title-row { align-items: center; flex-direction: row; }
  body[data-tool-slug="jpg-to-pdf"] .tool-title-row { align-items: center; flex-direction: row; }
  body[data-tool-slug="pdf-to-jpg"] .tool-title-row { align-items: center; flex-direction: row; }
  .pdf-page-actions { grid-template-columns: repeat(2, 44px); row-gap: 2px; }
  .pdf-icon-button { width: 44px; height: 44px; }
  .split-page-grid { grid-template-columns: 1fr; }
  .jpg-pdf-grid { grid-template-columns: 1fr; }
  .jpg-pdf-actions { grid-template-columns: repeat(3, 44px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
