@charset "UTF-8";

/* Tokens */
:root {
  --bg: #fff;
  --surface: #f5f5f3;
  --ink: #17191c;
  --text: #33363b;
  --muted: #5f646b;
  --line: #e1e3e6;
  --line-strong: #c4c8cd;
  --accent: #d9481c;
  --accent-text: #b2390f;
  --accent-soft: #fdf1ec;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --radius: 6px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--ink); letter-spacing: -0.02em; line-height: 1.35; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 18px; height: 18px; flex-shrink: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, select { min-width: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: #fbd5c7; color: var(--ink); }
[hidden] { display: none !important; }

.wrap { max-width: 1160px; margin-inline: auto; padding-inline: 32px; }
.skip { position: fixed; top: -100px; left: 12px; z-index: 99; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: var(--radius); }
.skip:focus { top: 12px; }

/* Buttons and links */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius); font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center; transition: background-color .15s, border-color .15s; }
.button.dark { background: var(--ink); color: #fff; }
.button.dark:hover { background: #000; }
.button.light { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.button.light:hover { border-color: var(--ink); }
.button.full { width: 100%; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-size: 15px; font-weight: 600; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link svg { width: 16px; height: 16px; }

/* Header */
.site-header { max-width: 1160px; min-height: 68px; margin-inline: auto; padding: 0 32px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--ink); font-size: 19px; font-weight: 700; letter-spacing: -0.03em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.brand-symbol { display: grid; grid-template-columns: 10px 10px; gap: 2px; }
.brand-symbol i { width: 10px; height: 10px; background: var(--ink); }
.brand-symbol i:nth-child(2) { background: var(--accent); }
.brand-symbol i:nth-child(3) { background: #9aa0a6; }
.brand-symbol i:nth-child(4) { background: #d5d8dc; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-left: auto; font-size: 15px; font-weight: 500; }
.site-header nav a { padding: 6px 0; color: var(--text); border-bottom: 2px solid transparent; }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current=page] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.header-action { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: var(--radius); background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; }
.header-action:hover { background: #000; }
.header-action svg { width: 16px; height: 16px; }
.site-header + main { border-top: 1px solid var(--line); }

/* Home */
.home-top { padding-top: 56px; padding-bottom: 56px; }
.home-intro { max-width: 720px; }
.home-intro h1 { font-size: 40px; font-weight: 700; line-height: 1.3; }
.home-intro p { margin-top: 16px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.tool-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-list a { height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.tool-list a:hover { border-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.tool-name { color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.tool-text { color: var(--muted); font-size: 15px; line-height: 1.65; }
.tool-spec { margin-top: auto; padding-top: 8px; color: var(--muted); font-size: 13px; }
.tool-go { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-size: 15px; font-weight: 600; }
.tool-list a:hover .tool-go { text-decoration: underline; text-underline-offset: 3px; }
.spec-strip { margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec-strip > div { padding: 16px 0; }
.spec-strip > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.spec-strip dt { color: var(--muted); font-size: 13px; }
.spec-strip dd { margin: 2px 0 0; color: var(--ink); font-size: 15px; font-weight: 600; }
.home-guides { padding-bottom: 72px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.section-heading h2 { font-size: 24px; font-weight: 700; }

/* Guide list (home, guide index, related) */
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
.guide-card { min-width: 0; border-top: 1px solid var(--line); }
.guide-card > a { display: block; padding: 20px 0 24px; }
.card-meta { display: block; color: var(--muted); font-size: 13px; }
.guide-card h3 { margin: 6px 0 8px; font-size: 18px; font-weight: 700; line-height: 1.45; }
.guide-card p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.guide-card a:hover h3 { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* Guide index */
.page-intro { padding-top: 48px; padding-bottom: 72px; }
.page-intro h1 { font-size: 36px; font-weight: 700; }
.page-intro > p { margin-top: 10px; color: var(--muted); font-size: 17px; }
.guide-search { max-width: 520px; margin-top: 32px; }
.guide-search > label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 15px; font-weight: 600; }
.guide-search > div { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; overflow: hidden; }
.guide-search > div:focus-within { border-color: var(--ink); }
.guide-search input { flex: 1; width: 100%; padding: 11px 14px; border: 0; background: none; font-size: 16px; outline: none; }
.guide-search button { display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border-left: 1px solid var(--line); color: var(--ink); font-size: 15px; font-weight: 600; white-space: nowrap; }
.guide-search button:hover { background: var(--surface); }
.guide-search svg { width: 16px; height: 16px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.filter-tabs button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); font-size: 14px; }
.filter-tabs button:hover { border-color: var(--ink); }
.filter-tabs button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.search-count { margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.no-results { padding: 56px 16px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }

/* Article */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; color: var(--muted); font-size: 14px; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.article-wrap { max-width: 1060px; margin-inline: auto; padding: 32px 32px 80px; }
.article-heading { max-width: 760px; padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.article-heading h1 { font-size: 34px; font-weight: 700; }
.article-heading > p { margin-top: 12px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.article-meta { margin-top: 16px; color: var(--muted); font-size: 14px; }
.article-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 24px; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.toc strong { margin-bottom: 4px; color: var(--ink); font-size: 14px; }
.toc a { line-height: 1.5; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.toc .toc-tool { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--accent-text); font-weight: 600; }
.toc svg { width: 16px; height: 16px; }
.article-body { max-width: 700px; font-size: 17px; line-height: 1.85; }
.article-body .article-lead { color: var(--ink); font-size: 18px; }
.article-body section { margin: 40px 0; scroll-margin-top: 24px; }
.article-body h2 { margin-bottom: 14px; font-size: 23px; font-weight: 700; }
.article-body p + p { margin-top: 14px; }
.article-body ul { margin: 14px 0 0; padding-left: 20px; }
.article-body li { margin-bottom: 6px; }
.article-body > .button { margin-top: 8px; }
.table-wrap { margin: 20px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface); color: var(--ink); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.takeaway { margin: 36px 0 28px; padding: 18px 22px; border-left: 3px solid var(--accent); background: var(--surface); }
.takeaway > span { color: var(--ink); font-size: 14px; font-weight: 700; }
.takeaway p { margin-top: 4px !important; color: var(--ink); }
.article-sources { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.article-body .article-sources h2 { font-size: 16px; }
.article-sources a { display: block; margin: 6px 0; color: var(--accent-text); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.editorial-note { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.7; }
.editorial-note a { text-decoration: underline; text-underline-offset: 3px; }
.related { margin-top: 64px; }
.related > h2 { margin-bottom: 8px; font-size: 22px; font-weight: 700; }

/* Plain pages */
.plain-page { max-width: 800px; padding-top: 48px; padding-bottom: 88px; }
.plain-page h1 { margin-bottom: 32px; font-size: 34px; font-weight: 700; }
.plain-page > p { color: var(--muted); font-size: 17px; }
.plain-page section { margin: 28px 0; }
.plain-page h2 { margin-bottom: 8px; font-size: 19px; font-weight: 700; }
.plain-page section p { font-size: 16px; line-height: 1.85; }
.plain-page > .text-link, .plain-page > .button { margin-top: 28px; }

/* Tool pages */
.tool-intro { padding-top: 32px; padding-bottom: 28px; }
.tool-intro h1 { font-size: 32px; font-weight: 700; }
.tool-intro > p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.tool-intro > .privacy-pill { margin-top: 12px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.privacy-pill::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.workbench { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; padding-bottom: 48px; }
.work-main, .work-settings, .compress-main, .compress-settings, .ratio-settings, .ratio-result { min-width: 0; padding: 24px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.work-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.work-top h2, .work-settings > h2, .compress-settings h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; }
.work-top h2 > span, .work-settings > h2 > span, .compress-settings h2 span { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; background: var(--ink); color: #fff; font: 600 12px/1 var(--mono); border-radius: 3px; }
.work-top .text-link { font-size: 14px; color: var(--muted); font-weight: 500; }
.work-top .text-link:not(:disabled):hover { color: var(--ink); }
.work-settings > h2, .compress-settings h2 { margin-bottom: 18px; }
.drop-zone { position: relative; min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; border: 2px dashed var(--line-strong); border-radius: 8px; background: var(--surface); text-align: center; transition: background-color .15s, border-color .15s; }
.drop-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone:focus-within { border-color: var(--ink); }
.drop-zone input[type=file] { position: absolute; bottom: 20px; left: 50%; width: 1px; height: 1px; opacity: 0; }
.drop-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); }
.drop-icon svg { width: 24px; height: 24px; }
.drop-zone h3 { font-size: 18px; font-weight: 700; }
.drop-zone p { margin: 6px 0 18px; color: var(--muted); font-size: 15px; }
.drop-zone label.button { cursor: pointer; }
.drop-zone small { margin: 14px 0 10px; color: var(--muted); font-size: 13px; }
.drop-zone .text-link { font-size: 14px; }
fieldset { min-width: 0; margin: 0 0 20px; padding: 0 0 20px; border: 0; border-bottom: 1px solid var(--line); }
legend { margin-bottom: 12px; padding: 0; color: var(--ink); font-size: 15px; font-weight: 700; }
.field { position: relative; display: block; margin-bottom: 14px; color: var(--ink); font-size: 14px; font-weight: 600; }
.field > span { float: right; color: var(--muted); font-weight: 400; }
.field input, .field select { display: block; width: 100%; min-height: 42px; margin-top: 6px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; font-size: 16px; font-weight: 400; }
.field input:hover, .field select:hover { border-color: #9aa0a6; }
.field input:focus, .field select:focus { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: -1px; }
.dimension-fields { display: flex; align-items: center; gap: 10px; }
.dimension-fields > .field { flex: 1; min-width: 0; }
.dimension-fields > i { margin-top: 10px; color: var(--muted); font-style: normal; }
.check-field { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; color: var(--text); font-size: 15px; cursor: pointer; }
.check-field input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.field-note { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.field-note a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.quality-label { display: flex; justify-content: space-between; margin-top: 16px; color: var(--ink); font-size: 14px; font-weight: 600; }
.quality-label output { font-family: var(--mono); }
input[type=range] { width: 100%; margin: 10px 0 0; accent-color: var(--ink); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.settings-help { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.settings-help strong { color: var(--ink); font-size: 15px; }
.settings-help p { margin: 4px 0 8px; color: var(--muted); font-size: 14px; }
.settings-help .text-link { font-size: 14px; }
.preview { display: grid; place-items: center; min-height: 160px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.checker { background: repeating-conic-gradient(#ececec 0 25%, #fff 0 50%) 50% / 16px 16px; }
.preview img { max-height: 400px; object-fit: contain; }
.image-info { display: grid; gap: 2px; margin: 12px 0 14px; }
.image-info strong { color: var(--ink); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.image-info span { color: var(--muted); font-size: 14px; font-family: var(--mono); }
.original-panel > .text-link { font-size: 14px; }
.result-panel { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.saving { color: var(--ink); font-size: 14px; font-weight: 600; }
.result-footnote { margin-top: 10px; color: var(--muted); font-size: 14px; }
.tool-message { margin-top: 16px; padding: 12px 14px; border: 1px solid #f4c7c3; border-radius: var(--radius); background: var(--danger-soft); color: var(--danger); font-size: 15px; line-height: 1.6; }
.tool-explain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-top: 8px; padding-bottom: 64px; }
.tool-explain > div { padding-top: 16px; border-top: 1px solid var(--line); }
.tool-explain h2 { margin-bottom: 8px; font-size: 17px; font-weight: 700; }
.tool-explain p { color: var(--muted); font-size: 15px; line-height: 1.75; }

/* Ratio */
.ratio-workbench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; padding-bottom: 48px; }
.ratio-settings h2 { margin-bottom: 18px; font-size: 18px; font-weight: 700; }
.ratio-presets, .kb-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.kb-presets { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.ratio-presets button, .kb-presets button { min-height: 42px; padding: 0 4px; color: var(--ink); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ratio-presets button + button, .kb-presets button + button { border-left: 1px solid var(--line-strong); }
.ratio-presets button:hover, .kb-presets button:hover { background: var(--surface); }
.ratio-presets button[aria-pressed=true], .kb-presets button[aria-pressed=true] { background: var(--ink); color: #fff; }
.ratio-result { text-align: center; }
.ratio-stage { position: relative; display: grid; place-items: center; height: 240px; border-radius: var(--radius); background-color: var(--surface); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 20px 20px; }
#ratio-shape { display: grid; place-items: center; width: 140px; height: 175px; max-width: 270px; max-height: 180px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: 600 20px/1 var(--mono); }
.ratio-axis { position: absolute; right: 10px; bottom: 6px; color: var(--muted); font-size: 12px; font-style: normal; }
.ratio-answer { padding: 20px 0 16px; }
.ratio-answer small { color: var(--muted); font-size: 14px; }
.ratio-answer strong { display: block; margin: 4px 0; color: var(--ink); font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ratio-answer strong span { color: var(--muted); font-size: 16px; font-weight: 500; }
.ratio-answer p { color: var(--muted); font: 14px var(--mono); }
.ratio-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.reading-banner { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 64px; padding-top: 24px; padding-bottom: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reading-banner h2 { margin-bottom: 6px; font-size: 20px; font-weight: 700; }
.reading-banner p { color: var(--muted); font-size: 15px; line-height: 1.7; }
.reading-banner .text-link { flex-shrink: 0; }

/* Target-size tool */
.compress-bench { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; padding-bottom: 48px; }
.compress-select { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.compress-select { position: relative; }
.compress-select input[type=file] { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; }
.compress-select:has(input[type=file]:focus-visible) label { outline: 2px solid var(--accent); outline-offset: 2px; }
.compress-select label.button { cursor: pointer; }
.compress-select p { width: 100%; color: var(--muted); font-size: 14px; }
.compress-compare { display: grid; gap: 24px; margin-top: 20px; }
.compress-compare:not(:has(figure:not([hidden]))) { display: none; }
.compress-compare figure { min-width: 0; margin: 0; }
.compress-compare figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.compress-compare figcaption b { color: var(--ink); font-size: 16px; }
.compress-compare figcaption span { color: var(--muted); font-size: 14px; font-family: var(--mono); overflow-wrap: anywhere; }
.compress-image { border: 1px solid var(--line); border-radius: var(--radius); background: repeating-conic-gradient(#ececec 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.compress-image img { max-width: 100%; max-height: 360px; margin: auto; object-fit: contain; }
.compress-fit { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 15px; line-height: 1.6; }
.compress-fit:empty { display: none; }
#compress-download { margin-top: 14px; }
#compress-progress:empty { display: none; }
.compress-settings fieldset:last-of-type { margin-bottom: 20px; }

/* Footer */
.site-footer { margin-top: 0; padding: 40px max(32px, calc((100vw - 1096px) / 2)) 24px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; }
.footer-top { display: flex; align-items: flex-start; gap: 32px; padding-bottom: 28px; }
.footer-top .brand { font-size: 17px; }
.footer-top > p { margin-right: auto; line-height: 1.7; }
.footer-top > div { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--text); }
.footer-top > div a:hover, .footer-analytics:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-analytics { font-size: inherit; line-height: inherit; text-align: left; }
.footer-business { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 48px; padding: 20px 0; border-top: 1px solid var(--line-strong); }
.footer-business-identity { display: flex; flex-direction: column; gap: 2px; }
.footer-business-kicker { font-size: 13px; }
.footer-business-identity strong { color: var(--ink); font-size: 16px; font-weight: 700; }
.footer-business-details { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0; }
.footer-business-details > div { display: flex; flex-direction: column; gap: 2px; }
.footer-business-details dt { font-size: 13px; }
.footer-business-details dd { margin: 0; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 16px; border-top: 1px solid var(--line-strong); font-size: 13px; }

/* Analytics consent panel */
.analytics-panel { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(420px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, .14); color: var(--text); }
.analytics-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.analytics-top strong { color: var(--ink); font-size: 16px; }
.analytics-top button { width: 32px; height: 32px; color: var(--muted); font-size: 24px; line-height: 1; border-radius: var(--radius); }
.analytics-top button:hover { background: var(--surface); color: var(--ink); }
.analytics-panel > p { margin-top: 10px; font-size: 14px; line-height: 1.65; }
.analytics-panel .analytics-status { padding: 8px 12px; border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 14px; }
.analytics-panel .analytics-status:empty { display: none; }
.analytics-actions { display: flex; gap: 8px; margin-top: 16px; }
.analytics-actions .button { flex: 1; padding: 0 10px; font-size: 14px; }
.analytics-panel > a { display: inline-block; margin-top: 12px; color: var(--accent-text); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* Responsive */
@media (max-width: 1000px) {
  .header-action { display: none; }
  .tool-list, .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 170px minmax(0, 1fr); gap: 36px; }
  .workbench { grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); }
  .compress-bench { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .site-header { flex-wrap: wrap; gap: 8px 16px; min-height: 0; padding: 14px 16px 10px; }
  .site-header nav { width: 100%; margin-left: 0; gap: 2px 18px; font-size: 15px; }
  .home-top { padding-top: 32px; padding-bottom: 40px; }
  .home-intro h1 { font-size: 28px; }
  .home-intro p { font-size: 16px; }
  .tool-list, .guide-grid { grid-template-columns: 1fr; }
  .tool-list { margin-top: 28px; gap: 12px; }
  .tool-list a { padding: 20px; }
  .spec-strip { grid-template-columns: 1fr; }
  .spec-strip > div { padding: 12px 0; }
  .spec-strip > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .section-heading h2 { font-size: 21px; }
  .page-intro { padding-top: 32px; padding-bottom: 56px; }
  .page-intro h1 { font-size: 28px; }
  .article-wrap { padding: 20px 16px 64px; }
  .article-heading h1 { font-size: 26px; }
  .article-heading > p { font-size: 16px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
  .article-body { font-size: 16px; line-height: 1.8; }
  .article-body .article-lead { font-size: 17px; }
  .article-body h2 { font-size: 20px; }
  .plain-page { padding-top: 32px; padding-bottom: 64px; }
  .plain-page h1 { font-size: 26px; margin-bottom: 20px; }
  .tool-intro { padding-top: 20px; padding-bottom: 20px; }
  .tool-intro h1 { font-size: 26px; }
  .workbench, .ratio-workbench, .compress-bench { grid-template-columns: 1fr; gap: 16px; }
  .work-main, .work-settings, .compress-main, .compress-settings, .ratio-settings, .ratio-result { padding: 18px; }
  .drop-zone { min-height: 260px; }
  .tool-explain { grid-template-columns: 1fr; gap: 20px; }
  .reading-banner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .ratio-answer strong { font-size: 28px; }
  .footer-top { flex-direction: column; gap: 14px; }
  .site-footer { padding: 32px 16px 20px; }
  .footer-business { display: block; }
  .footer-business-identity { margin-bottom: 14px; }
  .footer-business-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .analytics-panel { right: 16px; bottom: 16px; }
}

@media (max-width: 380px) {
  .ratio-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ratio-presets button:nth-child(4) { border-left: 0; }
  .ratio-presets button:nth-child(n+4) { border-top: 1px solid var(--line-strong); }
  .analytics-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
