:root {
  color-scheme: light;
  --page: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f1f3f5;
  --ink: #171c23;
  --ink-2: #38414b;
  --muted: #6d7882;
  --soft: #9aa4ad;
  --line: #e4e8ec;
  --line-strong: #d3dbe0;
  --green: #8bbd45;
  --green-strong: #537b24;
  --green-soft: #edf5df;
  --green-ink: #35501c;
  --hero: #17201e;
  --hero-2: #202a27;
  --danger: #a43c37;
  --shadow: 0 14px 38px rgba(24, 36, 40, .06);
  --font: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "Cascadia Code", Consolas, "Liberation Mono", monospace;
  font-family: var(--font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --page: #101316;
    --surface: #171b1f;
    --surface-2: #1e2429;
    --ink: #edf1f2;
    --ink-2: #c2cacf;
    --muted: #a0aab0;
    --soft: #78848b;
    --line: #2b3339;
    --line-strong: #39434a;
    --green: #b2df72;
    --green-strong: #c1e696;
    --green-soft: #252e20;
    --green-ink: #d3edaf;
    --hero: #0d1110;
    --hero-2: #171e1b;
    --danger: #f28d83;
    --shadow: 0 16px 42px rgba(0, 0, 0, .2);
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #101316;
  --surface: #171b1f;
  --surface-2: #1e2429;
  --ink: #edf1f2;
  --ink-2: #c2cacf;
  --muted: #a0aab0;
  --soft: #78848b;
  --line: #2b3339;
  --line-strong: #39434a;
  --green: #b2df72;
  --green-strong: #c1e696;
  --green-soft: #252e20;
  --green-ink: #d3edaf;
  --hero: #0d1110;
  --hero-2: #171e1b;
  --danger: #f28d83;
  --shadow: 0 16px 42px rgba(0, 0, 0, .2);
}

html[data-theme="light"] {
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { min-height: 100vh; min-height: 100svh; margin: 0; display: flex; flex-direction: column; background: var(--page); color: var(--ink); font: 400 14px/1.6 var(--font); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
img, canvas, video { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.skip-link { position: fixed; z-index: 100; top: -70px; left: 16px; padding: 10px 14px; border-radius: 8px; background: var(--green); color: #152012; font-weight: 700; }
.skip-link:focus { top: 12px; }
.topbar { position: sticky; z-index: 30; top: 0; height: 70px; padding: 0 clamp(16px, 4vw, 58px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 180px; text-decoration: none; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid #313e37; border-radius: 11px; background: #202a27; color: #b8e676; box-shadow: inset 0 0 0 1px rgba(255,255,255,.03); font-size: 18px; font-weight: 800; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-size: 14px; letter-spacing: -.3px; font-weight: 800; }
.brand-copy small { margin-top: 5px; color: var(--muted); font: 600 9px/1 var(--mono); letter-spacing: 1.1px; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.tool-button, .button { min-height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 650; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.tool-button:hover, .button:hover { border-color: var(--line-strong); background: var(--surface-2); }
.tool-button:active, .button:active { transform: translateY(1px); }
.language-button { min-width: 74px; }
.local-data-button { color: var(--green-strong); }

.page-layout { width: min(1500px, 100%); min-height: 0; flex: 1 0 auto; margin: 0 auto; padding: 26px clamp(16px, 3vw, 44px) 64px; display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.sidebar { position: sticky; top: 94px; min-width: 0; padding: 14px 0; }
.sidebar-title { padding: 0 12px 13px; color: var(--muted); font: 700 10px var(--mono); letter-spacing: 1.1px; text-transform: uppercase; }
.category-link { min-height: 42px; margin: 2px 0; padding: 0 10px; display: flex; align-items: center; gap: 10px; border-radius: 9px; color: var(--ink-2); font-size: 12px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.category-link > span { width: 22px; color: var(--muted); text-align: center; font: 15px var(--mono); }
.category-link b { margin-left: auto; color: var(--soft); font: 500 10px var(--mono); }
.category-link:hover { background: var(--surface-2); }
.category-link.is-active { background: var(--green-soft); color: var(--green-ink); }
.category-link.is-active > span { color: var(--green-strong); }
.sidebar-note { margin: 28px 6px 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); }
.sidebar-note strong { color: var(--ink-2); font-size: 11px; }
.sidebar-note p { margin: 5px 0 0; font-size: 10px; line-height: 1.6; }
.local-dot { width: 8px; height: 8px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.main-content { min-width: 0; }

.hero { min-height: 258px; position: relative; overflow: hidden; padding: clamp(25px, 4vw, 44px); display: grid; grid-template-columns: minmax(0, 1fr) 240px; align-items: center; gap: 20px; border: 1px solid #29352f; border-radius: 16px; background: radial-gradient(ellipse at 82% 0%, rgba(127, 165, 98, .17), transparent 42%), linear-gradient(120deg, var(--hero), var(--hero-2)); color: #f2f5ef; box-shadow: 0 18px 44px rgba(23, 32, 30, .09); }
.hero-copy { position: relative; z-index: 1; max-width: 640px; }
.eyebrow { color: var(--green-strong); font: 700 10px/1.4 var(--mono); letter-spacing: 1.2px; text-transform: uppercase; }
.hero .eyebrow { color: #a3b39f; }
.hero h1 { max-width: 620px; margin: 14px 0 10px; color: #f3f5f1; font-size: clamp(30px, 4vw, 43px); line-height: 1.12; letter-spacing: -1.5px; }
.hero p { max-width: 540px; margin: 0; color: #b5c0b8; font-size: 13px; line-height: 1.75; }
.hero-badges { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-badges span { padding: 5px 9px; border: 1px solid #39453e; border-radius: 99px; color: #c3d0c5; font-size: 10px; }
.hero-art { height: 180px; position: relative; display: grid; place-items: center; }
.orbit { position: absolute; width: 165px; height: 165px; border: 1px solid rgba(190, 225, 158, .16); border-radius: 50%; }
.orbit-a { transform: rotateX(68deg) rotateZ(24deg); }
.orbit-b { width: 210px; height: 210px; transform: rotateX(68deg) rotateZ(-25deg); }
.art-card { width: 118px; height: 118px; position: relative; z-index: 1; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #536248; border-radius: 19px; background: linear-gradient(145deg, #2a382f, #1b2420); box-shadow: 0 18px 50px rgba(0,0,0,.22); transform: rotate(-8deg); }
.art-card span { color: #b7e37d; font-size: 32px; line-height: 1; }
.art-card i { color: #819082; font: normal 14px var(--mono); letter-spacing: 2px; }
.art-card b { color: #d8ecc1; font: 700 12px var(--mono); }
.language-notice { margin: 0 0 16px; padding: 11px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); font-size: 12px; }
.language-notice a { color: var(--green-strong); font-weight: 700; text-decoration: none; }
.language-notice button { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }

.catalog-section { margin-top: 40px; }
.catalog-heading { margin-bottom: 16px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.catalog-heading h2 { margin: 5px 0 0; font-size: 23px; letter-spacing: -.7px; }
.tool-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.tool-count strong { color: var(--ink); font-size: 19px; }
.search-row { margin-bottom: 16px; display: flex; gap: 9px; }
.search-box { height: 46px; flex: 1; min-width: 0; padding: 0 12px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); }
.search-box > span { font: 20px var(--mono); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: var(--soft); }
.search-box kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--soft); font: 10px var(--mono); }
.button-quiet { background: transparent; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tool-card { min-width: 0; min-height: 110px; position: relative; padding: 14px; display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 2px 8px rgba(20,30,40,.015); transition: border-color .16s, transform .16s, box-shadow .16s; }
.tool-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; background: var(--green-soft); color: var(--green-strong); font: 700 13px var(--mono); }
.card-copy { min-width: 0; flex: 1; }
.card-copy h3 { margin: 1px 0 5px; font-size: 12px; line-height: 1.4; }
.card-copy h3 a { text-decoration: none; }
.card-copy h3 a::after { position: absolute; z-index: 1; inset: 0; border-radius: 12px; content: ""; }
.card-copy h3 a:focus-visible::after { outline: 3px solid var(--green); outline-offset: 3px; }
.card-copy h3 a:hover { color: var(--green-strong); }
.card-copy p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.favorite-button { width: 32px; height: 32px; position: relative; z-index: 2; flex: 0 0 32px; border: 0; border-radius: 7px; background: transparent; color: var(--soft); font-size: 20px; line-height: 1; cursor: pointer; }
.favorite-button:hover, .favorite-button[aria-pressed="true"] { background: var(--green-soft); color: var(--green-strong); }
.empty-state { padding: 32px; text-align: center; color: var(--muted); }
.catalog-views { margin: -5px 0 15px; display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-views [aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green-ink); }
.media-output { display: grid; justify-items: start; gap: 12px; }
.media-output svg { max-width: 100%; height: auto; }
.color-palette { display: flex; flex-wrap: wrap; gap: 7px; }
.color-swatch { min-width: 76px; min-height: 44px; padding: 20px 8px 6px; border: 1px solid var(--line); border-radius: 7px; background: linear-gradient(var(--swatch) 0 16px, var(--surface) 16px); color: var(--ink-2); font: 10px var(--mono); cursor: pointer; }
.output-preview { display: block; }
.markdown-preview { color: var(--ink-2); overflow-wrap: anywhere; }
.markdown-preview > :first-child { margin-top: 0; }
.markdown-preview pre { overflow: auto; padding: 12px; border-radius: 8px; background: var(--surface-2); }
.markdown-preview code { font-family: var(--mono); }
.html-sandbox { width: 100%; min-height: 280px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.timer-display { padding: 20px 0; color: var(--green-strong); font: 700 clamp(38px, 8vw, 62px)/1 var(--mono); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.timer-tool { gap: 16px; }
.timer-tool .timer-display { padding: 22px 12px 8px; text-align: center; font-size: clamp(48px, 10vw, 76px); letter-spacing: .02em; }
.timer-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.timer-controls .button { min-width: 110px; min-height: 44px; }
.timer-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.timer-inputs label { display: grid; gap: 6px; color: var(--ink-2); font-size: 11px; font-weight: 700; }
.timer-inputs input { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--page); color: var(--ink); font: 600 16px var(--mono); text-align: center; }
.pomodoro-settings { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pomodoro-settings label { font-size: 10px; }
.timer-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 11px; }
.timer-progress { width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 99px; background: var(--surface-2); accent-color: var(--green-strong); }
.timer-progress::-webkit-progress-bar { border-radius: 99px; background: var(--surface-2); }
.timer-progress::-webkit-progress-value { border-radius: 99px; background: var(--green); transition: width .15s linear; }
.timer-progress::-moz-progress-bar { border-radius: 99px; background: var(--green); }
.timer-sound { justify-self: center; display: flex !important; align-items: center; gap: 8px !important; color: var(--muted) !important; font-size: 11px !important; font-weight: 500 !important; }
.timer-sound input { width: 16px; height: 16px; accent-color: var(--green-strong); }
.pomodoro-status { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.pomodoro-status > span:first-child { padding: 5px 10px; border-radius: 99px; background: var(--green-soft); color: var(--green-ink); font-weight: 750; }
.lap-panel { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); }
.lap-heading { padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.lap-heading h3 { margin: 0; font-size: 12px; }
.lap-heading > span { color: var(--muted); font: 11px var(--mono); }
.lap-table-wrap { max-height: 230px; overflow: auto; }
.lap-table { width: 100%; border-collapse: collapse; font: 11px var(--mono); font-variant-numeric: tabular-nums; }
.lap-table th, .lap-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.lap-table th:first-child, .lap-table td:first-child { text-align: left; }
.lap-table th { position: sticky; top: 0; background: var(--surface); color: var(--muted); font: 600 10px var(--font); }
.lap-table tr:last-child td { border-bottom: 0; }
.lap-table .lap-empty td { color: var(--muted); text-align: center; font: 11px var(--font); }
.drawing-surface { width: 100%; height: auto; min-height: 160px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); touch-action: none; cursor: crosshair; }
.world-clock-grid { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.world-clock-grid .result-box { margin-top: 0; }
.world-clock-grid p { margin: 5px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 7px; }
.character-button { min-height: 48px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 22px; cursor: pointer; }
.character-button:hover, .character-button.copied { border-color: var(--green); background: var(--green-soft); }
.language-notice { margin-bottom: 14px; padding: 10px 13px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); font-size: 11px; }
.language-notice a { color: var(--green-strong); font-weight: 700; text-decoration: none; }
.language-notice button { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.tool-message { overflow-wrap: anywhere; }
.recordPreview { display: grid; gap: 10px; }
.recordPreview video, #recordPreview video { width: min(100%, 640px); border-radius: 10px; background: #090b0a; }

.tool-detail, .legal-page { width: min(100%, 900px); margin: 0 auto; }
.breadcrumbs { margin: 5px 0 21px; display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 11px; }
.breadcrumbs a { color: var(--green-strong); text-decoration: none; }
.tool-heading { padding: 25px 0 23px; }
.tool-heading h1, .legal-heading h1, .not-found h1 { margin: 8px 0 8px; font-size: clamp(28px, 4vw, 39px); line-height: 1.17; letter-spacing: -1px; }
.tool-heading > p { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.75; }
.tool-badges { margin-top: 14px; display: flex; gap: 8px; }
.tool-badges span { padding: 4px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font: 10px var(--mono); }
.tool-panel { min-height: 220px; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.tool-form { display: grid; gap: 14px; }
.tool-form label, .field-label { display: grid; gap: 6px; color: var(--ink-2); font-size: 11px; font-weight: 700; }
.tool-form .check-row { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 550; }
.tool-form .check-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--green-strong); }
.tool-form textarea, .tool-form input:not([type="checkbox"]):not([type="file"]):not([type="color"]), .tool-form select, .tool-form input[type="file"] { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--page); color: var(--ink); font-size: 12px; }
.tool-form textarea { min-height: 170px; resize: vertical; font: 12px/1.55 var(--mono); }
.tool-form input[type="file"] { padding: 9px; }
.tool-form input[type="color"] { width: 46px; height: 38px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-form .button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.input-stats { margin: -8px 0 0; color: var(--soft); font: 10px var(--mono); text-align: right; }
.password-strength { display: grid; grid-template-columns: minmax(120px, 1fr) auto; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.password-strength progress { width: 100%; height: 10px; accent-color: var(--green-strong); }
.media-meta { margin: 0; color: var(--muted); font-size: 11px; }
.button-primary { border-color: var(--green); background: var(--green); color: #182013; }
.button-primary:hover { border-color: var(--green-strong); background: var(--green-strong); color: #fff; }
.button-secondary { background: var(--surface-2); }
.result-box { min-width: 0; margin-top: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--page); }
.result-box h3 { margin: 0 0 8px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.result-content { overflow-wrap: anywhere; white-space: pre-wrap; color: var(--ink); font: 12px/1.6 var(--mono); }
.result-content:empty::before { content: attr(data-placeholder); color: var(--soft); }
.tool-message { min-height: 20px; color: var(--muted); font-size: 11px; }
.tool-error { color: var(--danger); }
.output-preview { width: 100%; max-height: 480px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 18px 18px; }
.download-list { display: flex; flex-wrap: wrap; gap: 8px; }
.download-list a { color: var(--green-strong); font-size: 11px; font-weight: 700; }
.how-to { margin: 27px 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.how-to h2 { margin: 0 0 9px; font-size: 15px; }
.how-to ol { margin: 0; padding-left: 21px; color: var(--muted); font-size: 12px; }
.privacy-hint { margin: 12px 0 0; color: var(--green-strong); font-size: 11px; }
.tool-explainer { margin: 22px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tool-explainer > div { min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.tool-explainer h2 { margin: 0 0 6px; font-size: 13px; }
.tool-explainer p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.tool-explainer strong { color: var(--ink-2); }
.tool-specific-tip { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--green); border-radius: 0 7px 7px 0; background: var(--surface-2); color: var(--ink-2); font-size: 11px; line-height: 1.7; }
.tool-examples, .tool-limits { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tool-examples > h2, .tool-limits > h2 { margin: 0 0 12px; font-size: 15px; }
.tool-example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tool-example-grid figure { min-width: 0; margin: 0; }
.tool-example-grid figcaption { margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.tool-example-grid pre { max-width: 100%; min-height: 44px; margin: 0; padding: 12px; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font: 12px/1.65 var(--mono); }
.tool-limits p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.adjacent-tools { display: flex; justify-content: space-between; gap: 12px; }
.adjacent-tools a { color: var(--green-strong); font-size: 11px; font-weight: 650; text-decoration: none; }

.legal-heading { padding: 13px 0 15px; }
.legal-heading > p { color: var(--muted); font-size: 11px; }
.prose { max-width: 760px; padding: 24px clamp(18px, 4vw, 38px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.prose h2 { margin: 19px 0 7px; font-size: 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 7px 0 13px; color: var(--ink-2); font-size: 12px; line-height: 1.8; }
.prose a { color: var(--green-strong); overflow-wrap: anywhere; }
.contact-address { font-size: 17px !important; font-weight: 750; }
.not-found { min-height: 55vh; display: grid; align-content: center; justify-items: start; }

.site-footer { flex: 0 0 auto; padding: 20px clamp(16px, 4vw, 58px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-brand { color: var(--ink); font-size: 12px; font-weight: 800; text-decoration: none; }
.site-footer p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.site-footer nav a { color: var(--muted); font-size: 10px; text-decoration: none; }
.site-footer nav a:hover { color: var(--green-strong); }
.local-data-dialog { width: min(450px, calc(100% - 28px)); padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--ink); box-shadow: 0 22px 80px rgba(0,0,0,.24); }
.local-data-dialog::backdrop { background: rgba(11, 16, 14, .56); backdrop-filter: blur(3px); }
.local-data-dialog h2 { margin: 0 38px 8px 0; font-size: 19px; }
.local-data-dialog p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.dialog-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--surface-2); font-size: 23px; cursor: pointer; }
.switch-row { margin: 18px 0; display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.switch-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--green-strong); }
.toast { position: fixed; z-index: 60; right: 20px; bottom: 20px; max-width: min(420px, calc(100% - 40px)); padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--ink); color: var(--page); font-size: 11px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1000px) {
  .page-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
  .tool-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: minmax(0, 1fr) 180px; }
}
@media (max-width: 720px) {
  .topbar { height: 62px; padding: 0 14px; gap: 8px; }
  .brand { min-width: auto; gap: 8px; }
  .brand-mark { width: 33px; height: 33px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy small { font-size: 8px; }
  .top-actions { gap: 5px; }
  .tool-button { min-height: 40px; padding: 0 8px; font-size: 10px; }
  .local-data-button { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-layout { display: block; padding: 14px 15px 42px; }
  .tool-explainer { grid-template-columns: 1fr; gap: 9px; }
  .tool-example-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; margin-bottom: 14px; padding: 0; overflow: auto; scrollbar-width: thin; }
  .sidebar-title, .sidebar-note { display: none; }
  .sidebar .category-link { min-height: 42px; margin: 0 4px 0 0; padding: 0 10px; display: inline-flex; white-space: nowrap; border: 1px solid var(--line); background: var(--surface); }
  .sidebar .category-link.is-active { border-color: transparent; background: var(--green-soft); }
  .category-link b { display: none; }
  .hero { min-height: 220px; padding: 25px 21px; grid-template-columns: 1fr 105px; gap: 8px; border-radius: 13px; }
  .hero h1 { font-size: clamp(26px, 7vw, 34px); letter-spacing: -.9px; }
  .hero p { font-size: 12px; }
  .hero-badges { margin-top: 15px; gap: 5px; }
  .hero-badges span { font-size: 9px; }
  .hero-art { height: 140px; transform: scale(.76); transform-origin: center; }
  .catalog-section { margin-top: 28px; }
  .catalog-heading h2 { font-size: 20px; }
  .tool-grid { grid-template-columns: 1fr; gap: 8px; }
  .tool-card { min-height: 90px; padding: 12px; }
  .card-copy h3 { font-size: 12px; }
  .card-copy p { font-size: 10px; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .pomodoro-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-panel { padding: 14px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .site-footer nav { gap: 10px 15px; }
}
@media (max-width: 430px) {
  .brand-copy small { display: none; }
  .top-actions { gap: 4px; }
  .top-actions .tool-button { min-width: 0; padding: 0 7px; }
  .local-data-button { max-width: 72px; }
  .hero { grid-template-columns: 1fr 70px; padding: 22px 16px; }
  .hero-art { margin-left: -22px; transform: scale(.57); }
  .hero-badges span:nth-child(2) { display: none; }
  .search-row { gap: 6px; }
  .search-box { height: 42px; padding: 0 9px; }
  .search-box kbd { display: none; }
  .button-quiet { padding: 0 8px; }
  .tool-heading h1, .legal-heading h1 { font-size: 29px; }
  .tool-actions .button { flex: 1 1 auto; }
  .adjacent-tools { flex-direction: column; }
  .language-notice { align-items: flex-start; flex-wrap: wrap; }
  .language-notice button { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Dedicated audio conversion workspace */
.audio-converter-form { gap: 1.35rem; }
.audio-dropzone {
  position: relative;
  min-height: 190px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: 1.5rem;
  text-align: center;
  border: 2px dashed var(--line, #30383d);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface, #181c1f) 70%, transparent);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.audio-dropzone:hover, .audio-dropzone.is-dragging { border-color: var(--green, #8bbd45); background: color-mix(in srgb, var(--green, #8bbd45) 9%, var(--surface, #ffffff)); }
.audio-dropzone:focus-within { outline: 3px solid var(--green, #8bbd45); outline-offset: 2px; }
.audio-dropzone.is-dragging { transform: scale(1.008); }
.audio-dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.audio-dropzone strong { font-size: 1.08rem; }
.audio-dropzone > span:last-of-type, .field-hint { color: var(--muted, #9ba5ad); font-size: .9rem; }
.audio-drop-icon { color: var(--green, #8bbd45); font-size: 2.6rem; line-height: 1; }
.audio-file-list { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 1.5rem; color: var(--muted, #9ba5ad); }
.audio-file-chip { max-width: 100%; padding: .4rem .65rem; border: 1px solid var(--line, #30383d); border-radius: 999px; overflow-wrap: anywhere; font-size: .82rem; }
.media-settings { min-width: 0; margin: 0; padding: 0; border: 0; }
.media-settings legend { margin-bottom: .7rem; font-size: 1rem; font-weight: 700; }
.media-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.media-choice { min-width: 0; min-height: 70px; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; padding: .65rem .45rem; border: 1px solid var(--line, #30383d); border-radius: 12px; background: var(--surface, #181c1f); text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.media-choice:hover { border-color: var(--green, #8bbd45); }
.media-choice.is-selected { border: 2px solid var(--green, #8bbd45); background: color-mix(in srgb, var(--green, #8bbd45) 10%, var(--surface, #ffffff)); color: var(--ink, #171c23); }
.media-choice input { position: absolute; opacity: 0; pointer-events: none; }
.media-choice:has(input:focus-visible) { outline: 3px solid var(--green, #8bbd45); outline-offset: 2px; }
.media-choice strong { font-size: .98rem; }
.media-choice small { color: var(--muted, #9ba5ad); font-size: .75rem; font-weight: 400; }
.quality-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quality-choice { min-height: 64px; }
.channel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-hint { margin: .65rem 0 0; }
.audio-advanced { padding: .8rem 1rem; border: 1px solid var(--line, #30383d); border-radius: 12px; }
.audio-advanced summary { cursor: pointer; font-weight: 650; }
.audio-advanced[open] summary { margin-bottom: .8rem; }
.audio-engine-note { margin: 0; }
.audio-results { display: grid; gap: .65rem; }
.audio-results h3 { margin: .15rem 0 .2rem; }
.audio-result-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem; border: 1px solid var(--line, #30383d); border-radius: 10px; }
.audio-result-row span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .audio-dropzone { min-height: 160px; }
  .media-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audio-result-row { align-items: stretch; flex-direction: column; }
  .audio-result-row .button { width: 100%; }
}

/* Blue, wide-layout refresh */
:root {
  color-scheme: light;
  --page: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --ink: #1e293b;
  --ink-2: #42526a;
  --muted: #687991;
  --soft: #8a98ab;
  --line: #e3e9f1;
  --line-strong: #d1dbe8;
  --green: #3478f6;
  --green-strong: #1e5ed8;
  --green-soft: #eaf2ff;
  --green-ink: #2158b8;
  --hero: #eaf2ff;
  --hero-2: #f6f9ff;
  --shadow: 0 12px 32px rgba(29, 61, 111, .08);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --page: #151515;
  --surface: #1e1e1e;
  --surface-2: #272727;
  --ink: #f2f2f2;
  --ink-2: #d0d0d0;
  --muted: #a0a0a0;
  --soft: #777777;
  --line: #353535;
  --line-strong: #484848;
  --green: #b2df72;
  --green-strong: #c1e696;
  --green-soft: #292e22;
  --green-ink: #d3edaf;
  --hero: #191919;
  --hero-2: #222222;
  --shadow: 0 16px 42px rgba(0,0,0,.2);
}
html[data-theme="light"] { color-scheme: light; }
body { background: var(--page); }
.topbar { height: 74px; padding-inline: clamp(16px, 5vw, 78px); background: var(--surface); }
.brand-mark { border-color: #313e37; color: #fff; background: #202a27; box-shadow: none; }
.brand-icon { width:42px; height:42px; flex:none; object-fit:contain; border-radius:12px; }
.top-actions { flex-shrink:0; }
.page-layout { display:block; width:min(1500px,100%); min-height:0; flex:1 0 auto; margin:0 auto; padding:32px clamp(16px,4vw,58px) 70px; }
.main-content { width:100%; min-width:0; }
.hero { color:var(--ink); border:1px solid #dce8fa; border-radius:22px; background:radial-gradient(ellipse at 82% 0%,rgba(52,120,246,.11),transparent 42%),linear-gradient(120deg,#f4f8ff,#eaf2ff); box-shadow:var(--shadow); }
.hero .eyebrow { color:#42699d; }
.hero h1 { color:#172b49; }
.hero p { color:#52657f; }
.hero-badges span { border-color:#c8d9f2; color:#476281; }
.art-card { border-color:#a9c8f8; background:linear-gradient(145deg,#fff,#e4efff); color:#3478f6; box-shadow:0 14px 30px rgba(52,120,246,.12); }
.orbit { border-color:rgba(52,120,246,.15); }
.category-tiles { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:28px 0 34px; }
.category-tile { min-height:104px; display:grid; grid-template-columns:38px 1fr; grid-template-rows:auto auto; align-content:center; column-gap:12px; padding:18px; border:1px solid var(--line); border-radius:14px; background:var(--surface); box-shadow:0 4px 16px rgba(31,55,85,.035); text-decoration:none; transition:transform .16s,border-color .16s,box-shadow .16s; }
.category-tile:hover { transform:translateY(-2px); border-color:#a9c8f8; box-shadow:var(--shadow); }
.category-tile span { grid-row:1 / 3; width:38px; height:38px; display:grid; place-items:center; border-radius:11px; color:var(--green-strong); background:var(--green-soft); font-size:20px; }
.category-tile strong { align-self:end; color:var(--ink); }
.category-tile small { color:var(--muted); }
.category-section { margin:34px 0; scroll-margin-top:100px; }
.category-section h2 { margin:0 0 14px; display:flex; align-items:center; gap:9px; font-size:19px; }
.category-section h2 span { color:var(--green-strong); }
.category-section h2 small { color:var(--muted); font-size:12px; font-weight:500; }
.tool-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.tool-card { min-height:134px; padding:18px; border-radius:14px; background:var(--surface); box-shadow:0 3px 13px rgba(31,55,85,.035); }
.tool-card:hover { border-color:#b3cdf4; transform:translateY(-2px); box-shadow:var(--shadow); }
.tool-card h3 a { text-decoration:none; }
.catalog-section { margin-top:34px; }
.catalog-heading { margin-bottom:18px; }
.site-footer { background:var(--surface); }
.media-page { max-width:1180px; margin:0 auto; }
.media-heading { margin:28px 0 22px; }
.media-heading h1 { margin:8px 0; font-size:clamp(32px,4vw,44px); letter-spacing:-1px; }
.media-heading p { max-width:760px; color:var(--muted); font-size:15px; }
.media-tabs { display:flex; gap:8px; padding:6px; border:1px solid var(--line); border-radius:14px; background:var(--surface); margin:22px 0; }
.media-tabs a { flex:1; text-align:center; padding:13px 16px; border-radius:10px; text-decoration:none; color:var(--ink-2); font-weight:700; }
.media-tabs a.is-active { color:#1e5ed8; background:#eaf2ff; box-shadow:inset 0 0 0 1px #c8dcff; }
.media-workspace { padding:clamp(18px,3vw,34px); border:1px solid var(--line); border-radius:18px; background:var(--surface); box-shadow:var(--shadow); }
.dropzone { min-height:190px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:8px; border:2px dashed var(--line-strong); border-radius:16px; background:var(--surface-2); cursor:pointer; text-align:center; transition:border-color .16s,background .16s; }
.dropzone:hover,.dropzone.is-dragging { border-color:var(--green); background:var(--green-soft); }
.dropzone input { position:absolute; width:1px; height:1px; opacity:0; }
.dropzone:focus-within { outline:3px solid var(--green); outline-offset:3px; }
.drop-icon { display:grid; place-items:center; inline-size:42px; block-size:42px; color:var(--green-strong); }
.drop-icon svg { display:block; inline-size:100%; block-size:100%; }
.dropzone strong { font-size:16px; }
.dropzone small { color:var(--muted); }
.media-block,.media-setting { margin-top:26px; }
.media-block h2,.media-setting h2,.media-queue h2 { margin:0 0 12px; font-size:16px; }
.format-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; }
.format-choice { cursor:pointer; }
.format-choice input { position:absolute; opacity:0; }
.format-choice span { min-height:66px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface); }
.format-choice small { color:var(--muted); font-size:11px; }
.format-choice input:checked + span { border:2px solid var(--green); background:var(--green-soft); color:var(--green-strong); }
.format-choice input:focus-visible + span { outline:3px solid var(--green); outline-offset:2px; }
.media-setting select,.media-fields input:not([type="checkbox"]),.media-fields select,.media-setting>label input:not([type="checkbox"]),.media-setting>select { width:100%; min-height:42px; padding:9px 11px; border:1px solid var(--line-strong); border-radius:9px; background:var(--surface); color:var(--ink); }
.media-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:14px; }
.media-fields label { display:grid; gap:7px; color:var(--ink-2); font-size:13px; font-weight:600; }
.inline-options { display:flex; flex-wrap:wrap; gap:10px 22px; }
.inline-options label,.check-line { display:flex; align-items:center; gap:8px; color:var(--ink-2); }
.media-fields label.check-line,.media-setting>label.check-line { display:flex; width:max-content; max-width:100%; align-items:center; justify-content:flex-start; gap:8px; }
.media-workspace input[type="checkbox"] { width:18px; height:18px; min-height:18px; flex:0 0 18px; margin:0; padding:0; accent-color:var(--green); }
.media-setting>label:not(.check-line) { display:block; }
.media-setting>label.check-line { margin:14px 0 0; }
.media-setting>label + h2 { margin-top:20px; }
.media-advanced { margin-top:22px; padding:15px 17px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }
.media-advanced summary { color:var(--ink); font-weight:700; cursor:pointer; }
.media-actions { display:flex; align-items:center; gap:16px; margin-top:24px; }
.media-actions [role=status] { color:var(--muted); }
.media-queue { margin-top:28px; }
.queue-item { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:14px; padding:12px 0; border-top:1px solid var(--line); }
.queue-file { min-width:0; display:flex; flex-direction:column; }
.queue-file strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.queue-file small,.queue-state { color:var(--muted); }
.queue-actions { display:flex; gap:7px; }
.button-small { min-height:32px; padding:5px 10px; font-size:12px; }
.image-preview { margin-top:15px; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }
.image-preview canvas { display:block; max-height:400px; margin:auto; object-fit:contain; }
.workspace-link { margin:0 0 16px; }
@media(max-width:980px) { .category-tiles { grid-template-columns:repeat(2,minmax(0,1fr)); } .tool-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:720px) {
  .topbar { height:auto; min-height:68px; padding:10px 14px; flex-wrap:wrap; gap:8px; }
  .brand { min-width:0; }
  .top-actions { gap:6px; }
  .top-actions .tool-button { min-height:36px; padding:7px 9px; font-size:11px; }
  .page-layout { padding:18px 14px 42px; }
  .category-tiles { gap:9px; margin:20px 0 26px; }
  .category-tile { min-height:90px; grid-template-columns:30px 1fr; padding:12px; column-gap:8px; }
  .category-tile span { width:30px; height:30px; font-size:16px; }
  .tool-grid { grid-template-columns:1fr; }
  .tool-card { min-height:112px; }
  .media-tabs a { padding:11px 5px; font-size:12px; }
  .media-workspace { padding:15px; }
  .dropzone { min-height:150px; }
  .format-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  .format-choice span { min-height:58px; }
  .media-fields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .queue-item { grid-template-columns:minmax(0,1fr) auto; }
  .queue-state { grid-column:1; grid-row:2; }
  .queue-actions { grid-column:2; grid-row:1 / 3; }
  .media-actions { align-items:flex-start; flex-direction:column; gap:10px; }
}
@media(max-width:390px) { .category-tile small { font-size:10px; } }
.media-guide { width:100%; max-width:none; box-sizing:border-box; margin:36px 0 10px; padding:clamp(18px,2.5vw,28px); border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.media-guide h2 { margin:0 0 16px; font-size:21px; }
.media-guide h3 { margin:0 0 9px; font-size:15px; }
.media-guide p,.media-guide li { color:var(--ink-2); line-height:1.75; }
.media-guide-grid,.media-guide-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.media-guide-grid > article,.media-guide-details > section,.media-guide-details > aside { min-width:0; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }
.media-guide-grid p,.media-guide-details p { margin:0; }
.media-guide-details { margin-top:16px; align-items:start; }
.media-guide ol { margin:0; padding-left:22px; }
.media-guide li + li { margin-top:5px; }
.media-note { margin:12px 0 0; color:var(--muted); font-size:12px; }
@media(max-width:720px) { .media-guide { margin-top:20px; padding:17px; } .media-guide-grid,.media-guide-details { grid-template-columns:1fr; gap:10px; } }

/* Keep the homepage hero consistent with the selected dark theme. */
html[data-theme="dark"] .hero {
  color: var(--ink);
  border-color: var(--line);
  background: radial-gradient(ellipse at 82% 0%, rgba(255,255,255,.055), transparent 43%), linear-gradient(120deg, #191919, #222222);
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .hero .eyebrow { color: #b2df72; }
html[data-theme="dark"] .hero h1 { color: #f2f2f2; }
html[data-theme="dark"] .hero p { color: #c0c0c0; }
html[data-theme="dark"] .hero-badges span { border-color: #3b3b3b; color: #d0d0d0; }
html[data-theme="dark"] .art-card { border-color: #505050; background: linear-gradient(145deg, #303030, #222222); color: #b2df72; box-shadow: 0 14px 30px rgba(0, 0, 0, .3); }
html[data-theme="dark"] .orbit { border-color: rgba(255,255,255,.12); }

/* System-preferred dark palette used when no manual theme override is active. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --page: #151515;
    --surface: #1e1e1e;
    --surface-2: #272727;
    --ink: #f2f2f2;
    --ink-2: #d0d0d0;
    --muted: #a0a0a0;
    --soft: #777777;
    --line: #353535;
    --line-strong: #484848;
    --green: #b2df72;
    --green-strong: #c1e696;
    --green-soft: #292e22;
    --green-ink: #d3edaf;
    --hero: #191919;
    --hero-2: #222222;
    --shadow: 0 16px 42px rgba(0,0,0,.2);
  }
  html:not([data-theme]) .hero {
    color: var(--ink);
    border-color: var(--line);
    background: radial-gradient(ellipse at 82% 0%, rgba(255,255,255,.055), transparent 43%), linear-gradient(120deg,#191919,#222222);
    box-shadow: var(--shadow);
  }
  html:not([data-theme]) .hero .eyebrow { color:#b2df72; }
  html:not([data-theme]) .hero h1 { color:#f2f2f2; }
  html:not([data-theme]) .hero p { color:#c0c0c0; }
  html:not([data-theme]) .hero-badges span { border-color:#3b3b3b; color:#d0d0d0; }
  html:not([data-theme]) .art-card { border-color:#505050; background:linear-gradient(145deg,#303030,#222222); color:#b2df72; box-shadow:0 14px 30px rgba(0,0,0,.3); }
  html:not([data-theme]) .orbit { border-color:rgba(255,255,255,.12); }
}
.media-tabs a.is-active { color:var(--green-strong); background:var(--green-soft); box-shadow:inset 0 0 0 1px var(--line-strong); }

/* Keep the eight tool groups beside the brand on desktop. */
html { scroll-padding-top: 92px; }
.topbar { height:auto; min-height:74px; display:block; padding:8px clamp(16px,5vw,78px); }
.topbar-main { min-height:58px; display:flex; align-items:center; gap:clamp(6px,1vw,14px); }
.topbar-main .brand { flex:0 0 auto; }
.topbar-main .category-nav { width:auto; min-width:0; flex:1 1 auto; justify-content:flex-start; gap:2px; padding:0; border:0; }
.topbar-main .top-actions { flex:0 0 auto; margin-left:0; }
.category-nav { display:flex; align-items:center; overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:thin; }
.category-nav-link { flex:0 0 auto; padding:7px 8px; border-radius:8px; color:var(--ink-2); font-size:12px; font-weight:650; line-height:1.3; text-decoration:none; white-space:nowrap; }
.nav-label-compact { display:none; }
.category-nav-link:hover,.category-nav-link.is-current { color:var(--green-strong); background:var(--green-soft); }
.category-section { scroll-margin-top:92px; }
@media(max-width:900px) {
  .category-nav-link { padding-inline:6px; font-size:11px; }
}
@media(max-width:720px) {
  .topbar { height:auto; min-height:0; padding:8px 12px 0; gap:0; }
  .topbar-main { min-height:48px; flex-wrap:wrap; gap:6px 10px; }
  .topbar-main .brand { order:1; }
  .topbar-main .top-actions { order:2; margin-left:auto; }
  .topbar-main .category-nav { order:3; flex:0 0 100%; width:100%; margin-top:4px; }
  .category-nav { padding:7px 0; }
  .category-nav-link { font-size:12px; }
  html { scroll-padding-top:132px; }
  .category-section { scroll-margin-top:132px; }
}
@media (min-width:721px) and (max-width:1600px) {
  .topbar-main { flex-wrap:wrap; }
  .topbar-main .brand { order:1; }
  .topbar-main .category-nav { order:2; flex:1 1 calc(100% - 210px); }
  .topbar-main .top-actions { order:3; }
}
@media (max-width:560px) {
  .topbar { padding:9px 12px 0; }
  .topbar-main { width:100%; min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 10px; }
  .topbar-main .brand { grid-column:1; grid-row:1; min-width:0; }
  .topbar-main .top-actions { grid-column:2; grid-row:1; width:auto; min-width:0; margin:0; display:flex; justify-content:flex-end; gap:6px; }
  .topbar-main .top-actions .tool-button { min-width:0; min-height:36px; flex:0 0 auto; padding:0 10px; white-space:nowrap; font-size:11px; }
  .topbar-main .top-actions .local-data-button { max-width:none; min-width:0; flex:0 1 auto; overflow:visible; text-overflow:clip; }
  html[lang^="en"] .topbar-main .top-actions .local-data-button { font-size:0; }
  html[lang^="en"] .topbar-main .top-actions .local-data-button::after { content:"Settings"; font-size:11px; }
  .topbar-main .category-nav { grid-column:1 / -1; grid-row:2; width:100%; min-width:0; margin:0; padding:6px 0 8px; gap:3px; overflow-x:auto; scrollbar-width:none; }
  .topbar-main .category-nav::-webkit-scrollbar { display:none; }
  .category-nav-link { flex:0 0 auto; padding:7px 8px; font-size:11px; }
  .nav-label-full { display:none; }
  .nav-label-compact { display:inline; }
}
@media (max-width:560px) {
  .topbar-main .top-actions #themeLabel { display:none; }
  .topbar-main .top-actions .tool-button { padding-inline:9px; }
}
@media (max-width:370px) {
  .topbar-main { grid-template-columns:minmax(0,1fr); }
  .topbar-main .brand { grid-column:1; grid-row:1; }
  .topbar-main .top-actions { grid-column:1; grid-row:2; width:100%; justify-content:flex-start; }
  .topbar-main .category-nav { grid-column:1; grid-row:3; }
}
