:root {
  color-scheme: light;
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-soft: #eef0ea;
  --ink: #151916;
  --muted: #626a63;
  --line: #dfe3dc;
  --accent: #276749;
  --accent-soft: #e4f1e9;
  --danger: #a43d36;
  --shadow: 0 24px 70px rgba(29, 43, 34, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.site-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 760; letter-spacing: -.03em; font-size: 18px; }
.brand span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; background: var(--ink); font-size: 15px; }
.site-header nav, footer div:last-of-type { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: 14px; }
.site-header nav a:hover, footer a:hover { color: var(--ink); }
.language-select select { width: auto; min-height: 38px; padding: 0 34px 0 12px; border-radius: 10px; background-color: transparent; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.breadcrumb { display: flex; align-items: center; gap: 10px; padding-top: 34px; color: var(--muted); font-size: 13px; }
.breadcrumb a:hover { color: var(--accent); }
.tool-hero { max-width: 780px; padding: 64px 0 42px; }
.tool-hero > span, .section-label, .directory-hero > span, .directory-heading > span, .privacy-card > span {
  display: block; color: var(--accent); font-size: 11px; line-height: 1; font-weight: 760; letter-spacing: .16em;
}
h1, h2, h3, p { margin-top: 0; }
.tool-hero h1, .directory-hero h1 { margin: 18px 0 18px; font-size: clamp(42px, 6vw, 72px); line-height: .98; letter-spacing: -.055em; font-weight: 720; }
.tool-hero p, .directory-hero p { max-width: 680px; margin: 0; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.65; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 24px; }
.tool-card { padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.privacy-card { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-soft); }
.privacy-card h2 { margin: 16px 0 12px; font-size: 22px; line-height: 1.2; letter-spacing: -.025em; }
.privacy-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
form > label, .field-grid label, [data-mode-panel] > label { display: grid; gap: 9px; color: #3f4740; font-size: 13px; font-weight: 650; }
input, select { width: 100%; min-height: 52px; padding: 0 15px; border: 1px solid #ccd2cb; border-radius: 12px; background: #fbfcfa; color: var(--ink); outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(39, 103, 73, .12); }
input[type="range"] { min-height: 18px; padding: 0; accent-color: var(--accent); box-shadow: none; }
.input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 9px; }
button { min-height: 50px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; cursor: pointer; font-weight: 700; }
button:hover { background: var(--accent); }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(39, 103, 73, .3); outline-offset: 3px; }
.wide-button { width: 100%; margin-top: 20px; }
.secondary, .examples button, .mode-tabs button, .consent button:first-child { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 13px; }
.secondary:hover, .examples button:hover, .mode-tabs button:hover { border-color: var(--accent); background: var(--accent-soft); }
.button-row { display: flex; gap: 8px; margin-top: 12px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-grid label input, .field-grid label select { margin-top: 9px; }
.input-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.code-input { margin-top: 9px; margin-bottom: 16px; font: 600 16px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.examples { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.examples > span { margin-right: 4px; color: var(--muted); font-size: 12px; }
.tool-error { margin-top: 22px; padding: 14px 16px; border: 1px solid #ecd0cd; border-radius: 12px; background: #fff4f2; color: var(--danger); font-size: 14px; }
.tool-result { min-height: 132px; margin-top: 24px; padding: 24px; border-radius: 16px; background: #f0f4ef; border: 1px solid #dce5dd; }
.result-placeholder { color: var(--muted); }
.result-kicker { display: block; margin-bottom: 10px; color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .14em; }
.tool-result h2 { margin-bottom: 8px; font-size: clamp(24px, 4vw, 36px); letter-spacing: -.035em; }
.tool-result p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.result-grid div { min-width: 0; padding: 14px; border-radius: 12px; background: var(--surface); }
.result-grid span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.result-grid strong { display: block; overflow-wrap: anywhere; margin-top: 6px; font-size: 16px; }
.result-grid small { display: block; overflow-wrap: anywhere; margin-top: 7px; color: var(--muted); line-height: 1.45; }
.result-list { margin: 14px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.mode-tabs { display: inline-flex; gap: 6px; padding: 5px; margin-bottom: 24px; border-radius: 13px; background: var(--surface-soft); }
.mode-tabs button.active { border-color: var(--surface); background: var(--surface); box-shadow: 0 4px 15px rgba(25, 35, 28, .08); }
.drop-field { min-height: 130px; place-items: center; align-content: center; margin-bottom: 18px; padding: 22px; border: 1px dashed #aeb8ae; border-radius: 16px; background: #fafbf8; text-align: center; cursor: pointer; }
.drop-field input { min-height: auto; padding: 10px 0 0; border: 0; background: transparent; box-shadow: none; }
.image-preview { display: block; width: auto; max-width: 100%; max-height: 380px; margin: 18px auto 0; border-radius: 12px; }
.download-link { display: inline-flex; align-items: center; min-height: 46px; margin-top: 16px; padding: 0 18px; border-radius: 11px; background: var(--ink); color: #fff; font-weight: 700; }
.content-section { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin: 110px 0; padding: 48px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.content-section h2, .faq-section h2, .related-section h2 { margin: 14px 0 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.045em; }
.content-section > p { margin: 0; color: var(--muted); line-height: 1.8; }
.faq-section, .related-section { margin-bottom: 110px; }
.faq-list { margin-top: 36px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 22px 4px; cursor: pointer; font-weight: 680; }
.faq-list details p { max-width: 760px; padding: 0 4px 22px; margin: 0; color: var(--muted); line-height: 1.7; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.related-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .55); }
.related-card:hover { border-color: #aeb9ae; background: var(--surface); transform: translateY(-2px); }
.related-card span { color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.related-card strong { display: block; margin-top: 16px; font-size: 18px; }
.related-card p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.directory-hero { max-width: 820px; padding: 110px 0 90px; }
.directory-group { margin-bottom: 90px; }
.directory-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.directory-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.directory-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; }
.directory-grid a { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.directory-grid a:hover { border-color: #acb8ad; box-shadow: 0 18px 48px rgba(29, 43, 34, .07); }
.directory-grid strong { font-size: 20px; letter-spacing: -.02em; }
.directory-grid p { margin: 10px 0 22px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.directory-grid span { color: var(--accent); font-size: 13px; font-weight: 700; }
footer { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: start; padding: 48px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer strong { color: var(--ink); }
footer p { margin: 8px 0 0; }
footer > span { grid-column: 1 / -1; }
.consent { position: fixed; right: 20px; bottom: 20px; z-index: 10; width: min(420px, calc(100% - 40px)); padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.consent p { margin-bottom: 16px; color: var(--muted); line-height: 1.5; }
.consent > div { display: flex; justify-content: flex-end; gap: 8px; }
.consent button { min-height: 40px; }

@media (max-width: 820px) {
  .site-shell { width: min(100% - 28px, 700px); }
  .site-header { min-height: 66px; }
  .site-header nav { gap: 14px; }
  .site-header nav a:not(:first-child) { display: none; }
  .tool-hero { padding: 52px 0 34px; }
  .tool-layout, .content-section { grid-template-columns: 1fr; }
  .content-section { gap: 28px; margin: 80px 0; }
  .related-grid { grid-template-columns: 1fr; }
  .directory-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .tool-hero h1, .directory-hero h1 { font-size: 40px; }
  .directory-hero { padding: 76px 0 60px; }
  .input-row, .field-grid, .result-grid { grid-template-columns: 1fr; }
  .input-row button { width: 100%; }
  .tool-card { padding: 20px; border-radius: 18px; }
  .tool-result { padding: 18px; }
  .mode-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  footer { grid-template-columns: 1fr; }
  footer > span { grid-column: 1; }
  footer div:last-of-type { flex-wrap: wrap; gap: 14px; }
}

