@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-700.woff2?v=1") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 700; size-adjust: 98%; ascent-override: 94.9%; descent-override: 27.6%; line-gap-override: 0%; }
:root {
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f1f3f7; --text: #0f172a; --muted: #55607a;
  --border: #e3e7ee; --field-border: #8792a6; --field: #ffffff; --accent: #f59e0b;
  --accent-text: #111827; --accent-strong: #92400e; --chip: #e3ebfd; --chip-label: #3f5584;
  --chip-text: #172554; --chip-const: #e9ecf1; --result-bg: #0f172a; --result-tile: #1c2840;
  --result-text: #ffffff; --result-muted: #b6c0d3; --result-border: #6b7a93; --seg-on: #0f172a;
  --seg-on-text: #ffffff; --track: #e2e6ed; --focus: #2563eb; --error: #b91c1c;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04); --tone-blue: #5b8def; --tone-green: #36c98d;
  --tone-yellow: #f5c02e; --tone-orange: #fb923c; --tone-red: #f26b6b; --tone-gray: #94a3b8;
  --accent-muted: #3b2a07; --heart: #e11d48; --overlay: rgba(2, 6, 23, .55); --shadow-pop: rgba(2, 6, 23, .35);
  --error-bg: rgba(248, 113, 113, .15); --radius: 14px; --brand-word: #0f1b2d;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Bricolage Grotesque", "Bricolage Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #131c2e; --surface-2: #1a2438; --text: #e8edf6; --muted: #a3afc4;
  --border: #26324a; --field-border: #6b7890; --field: #0e1626; --accent: #f6a623;
  --accent-text: #111827; --accent-strong: #fbbf24; --chip: #1f2f52; --chip-label: #a9bce6;
  --chip-text: #eef3ff; --chip-const: #273147; --result-bg: #1b2740; --result-tile: #26344f;
  --result-text: #ffffff; --result-muted: #c0cadb; --result-border: #7d8db0; --seg-on: #e8edf6;
  --seg-on-text: #0f172a; --track: #2b3750; --focus: #7aa7ff; --error: #fca5a5; --shadow: none; --brand-word: #fff;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #131c2e; --surface-2: #1a2438; --text: #e8edf6; --muted: #a3afc4;
    --border: #26324a; --field-border: #6b7890; --field: #0e1626; --accent: #f6a623;
    --accent-text: #111827; --accent-strong: #fbbf24; --chip: #1f2f52; --chip-label: #a9bce6;
    --chip-text: #eef3ff; --chip-const: #273147; --result-bg: #1b2740; --result-tile: #26344f;
    --result-text: #ffffff; --result-muted: #c0cadb; --result-border: #7d8db0; --seg-on: #e8edf6;
    --seg-on-text: #0f172a; --track: #2b3750; --focus: #7aa7ff; --error: #fca5a5; --shadow: none; --brand-word: #fff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1, h2, .result-value, .result-bar-value, .preview-example-value, .not-found-code { font-family: var(--font-heading); font-weight: 700; }
.step-title, .formula-label, .example-title, .search-status, .search-heading, .preview-category { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.preview-example-label, .result-bar-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--result-muted); }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr-only, .help { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
.error:empty, .summary:empty, .search-status:empty, .search-preview:empty { display: none; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

html { scroll-padding-top: 76px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand { --logo: 32px; display: inline-flex; align-items: center; gap: calc(var(--logo) * .3); color: var(--brand-word); flex: none; border-radius: 6px; }
.brand-mark { width: var(--logo); height: var(--logo); flex: none; }
.brand-word { width: calc(var(--logo) * 2.542); height: calc(var(--logo) * .585); flex: none; }
.brand-small { --logo: 26px; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-size: 15px; font-weight: 500; }
.main-nav a:hover { color: var(--accent-strong); }
.header-tools { display: flex; align-items: center; gap: 4px; }
.main-nav + .header-tools { margin-left: 8px; }
.brand + .header-tools { margin-left: auto; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: none; cursor: pointer; color: var(--text); }
.icon-button:hover { background: var(--surface-2); }
.icon-button svg { width: 20px; height: 20px; }
.icon-sun, [data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon { display: none; }
  :root:not([data-theme="light"]) .icon-sun { display: block; }
}
.lang-switch { font-size: 14px; font-weight: 600; text-decoration: none; padding: 6px 10px; border: 1px solid var(--field-border); border-radius: 8px; margin-left: 6px; }
.menu-open { display: none; }
@media (max-width: 1023px) {
  .has-menu .main-nav, .has-menu .theme-toggle, .has-menu .lang-switch { display: none; }
  .has-menu .header-tools { margin-left: auto; }
  .menu-open { display: inline-grid; }
}

main.wrap { padding-top: 32px; padding-bottom: 56px; flex: 1; width: 100%; }
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 10px; padding: 0; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
h1 { font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -.025em; }
.title-row { display: flex; align-items: center; gap: 12px; }
.lead { color: var(--muted); font-size: 17px; max-width: 580px; margin-top: 12px; }
.fav-button { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--muted); flex: none; }
.fav-button svg { width: 22px; height: 22px; }
.fav-button[aria-pressed="true"] { color: var(--heart); }
.fav-button[hidden], .example .button[hidden] { display: inline-flex !important; visibility: hidden; }
.fav-button[aria-pressed="true"] svg { fill: currentColor; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 26px; align-items: stretch; }
.input-card { padding: 22px 22px 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 14px; align-content: start; }
.input-card > * { grid-column: 1 / -1; }
.input-card > .half { grid-column: auto; display: flex; flex-direction: column; }
.half .field-head { flex: 1 0 auto; align-items: flex-end; }

.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.field-label { font-weight: 650; font-size: 15px; }
.unit-hint { color: var(--muted); font-size: 13px; text-align: right; }
.field-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.num { position: relative; flex: 1; min-width: 120px; }
.has-slider .num { flex: 0 0 96px; }
.num-input, .select { width: 100%; height: 46px; border: 1px solid var(--field-border); border-radius: 10px; background: var(--field); padding: 0 14px; font-size: 17px; }
.has-slider .num-input { text-align: right; }
.has-prefix .num-input { padding-left: 34px; }
.prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 17px; pointer-events: none; }
.num-input[aria-invalid="true"] { border-color: var(--error); }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 18px top 21px, right 13px top 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.select-unit { width: auto; flex: none; }
.range { flex: 1; min-width: 140px; height: 24px; margin: 0; background: transparent; accent-color: var(--seg-on); -webkit-appearance: none; appearance: none; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--seg-on) var(--fill, 0%), var(--track) var(--fill, 0%)); }
.range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--track); }
.range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--seg-on); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; background: var(--seg-on); border: 0; }
.range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--seg-on); border: 0; }
.range:disabled { opacity: .4; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--surface-2); border-radius: 11px; border: 1px solid var(--border); }
.seg-option { position: relative; }
.seg-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-option span { display: block; padding: 8px 14px; border-radius: 8px; font-size: 15px; font-weight: 550; color: var(--muted); cursor: pointer; }
.seg-option input:checked + span { background: var(--seg-on); color: var(--seg-on-text); font-weight: 650; }
.seg-option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.seg-unit { flex: none; }

.field:focus-within .help { position: static; width: auto; height: auto; clip: auto; white-space: normal; color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.error { color: var(--error); font-size: 14px; margin-top: 6px; font-weight: 550; }
.note { color: var(--muted); font-size: 13px; }
.notice { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; }

.result-card { background: var(--result-bg); color: var(--result-text); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 18px; border: 1px solid var(--result-bg); }
.result-label { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--result-muted); }
.result-value { font-size: clamp(48px, 6vw, 76px); letter-spacing: -.035em; line-height: 1.05; margin-top: 8px; font-variant-numeric: tabular-nums; }
.result-value .cur { color: var(--accent); }
.result-card .result-value[data-fmt^="number"] { color: var(--accent); }
.result-unit { font-size: .4em; font-weight: 600; letter-spacing: 0; color: var(--result-muted); }
.summary { color: var(--result-muted); font-size: 15px; margin-top: 8px; }
.band { font-weight: 700; font-size: 18px; margin-top: 10px; }
.scale { display: block; margin-top: 12px; overflow: visible; }
.scale text { fill: var(--result-muted); stroke: none; font-size: 11px; }
.scale-marker path { fill: var(--result-text); stroke: none; }
.tone-blue { fill: var(--tone-blue); } .tone-green { fill: var(--tone-green); } .tone-yellow { fill: var(--tone-yellow); }
.tone-orange { fill: var(--tone-orange); } .tone-red { fill: var(--tone-red); } .tone-gray { fill: var(--tone-gray); }
.scale rect { stroke: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 22px; }
.tile { background: var(--result-tile); border-radius: 11px; padding: 14px 14px 12px; }
.tile-label { font-size: 13px; color: var(--result-muted); }
.tile-value { font-size: 22px; font-weight: 750; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile-unit { font-size: 14px; font-weight: 500; color: var(--result-muted); }
.result-error { background: var(--error-bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-top: 14px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: auto; }
.share-status { font-size: 13px; color: var(--result-muted); }
.disclaimer { font-size: 12.5px; line-height: 1.5; color: var(--result-muted); border-top: 1px solid var(--result-border); padding-top: 12px; }
.disclaimer p + p { margin-top: 6px; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border-radius: 10px; font-weight: 650; font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.button-accent { background: var(--accent); color: var(--accent-text); }
.button-accent:hover { filter: brightness(1.06); }
.button-dark { background: var(--seg-on); color: var(--seg-on-text); }
.button-line { background: transparent; color: var(--text); border-color: var(--field-border); flex: none; }
.button-line:hover { border-color: var(--text); }

.explain { margin-top: 18px; padding: 22px 22px 24px; }
.explain-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.explain h2 { font-size: 23px; letter-spacing: -.01em; }
.explain-intro { color: var(--muted); max-width: 560px; margin-top: 6px; font-size: 15px; }
.step { margin-top: 18px; }
.step-title { margin-bottom: 8px; }
.step-formula, .group, .block, .block-part, .why { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.branch { display: contents; }
.chip { display: inline-flex; flex-direction: column; padding: 6px 12px 7px; border-radius: 9px; background: var(--chip); color: var(--chip-text); min-width: 54px; }
.chip-constant, .chip-num { background: var(--chip-const); }
.chip-label { font-size: 11.5px; color: var(--chip-label); line-height: 1.3; }
.chip-value { font-weight: 750; font-size: 16px; line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip-result { background: var(--accent); color: var(--accent-text); }
.chip-result .chip-label { color: var(--accent-muted); }
.op { color: var(--muted); font-weight: 700; min-width: 12px; text-align: center; }
.op-word, .kw { font-size: 13px; font-weight: 650; color: var(--muted); }
.paren { color: var(--muted); font-size: 22px; font-weight: 300; }
.block { border: 1px dashed var(--field-border); border-radius: 10px; padding: 6px 8px; }

.ad-slot { margin-top: 22px; height: 104px; display: grid; place-items: center; border: 1.5px dashed var(--field-border); border-radius: var(--radius); color: var(--muted); font-size: 12px; text-align: center; padding: 0 16px; }
.row { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px 56px; padding: 44px 0; }
.row + .row { border-top: 1px solid var(--border); }
.row h2 { font-size: 26px; letter-spacing: -.01em; }
.row-body { font-size: 17px; line-height: 1.65; }
.row-body > :not(:first-child) { margin-top: 16px; }
.row-body > p, .assumptions, .formula { max-width: 680px; }
.assumptions { margin: 0; padding-left: 22px; }
.assumptions li + li { margin-top: 8px; }
.formula, .faq, .example { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.formula { padding: 18px 20px; }
.formula-text { margin-top: 6px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.example { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.example-value { font: 700 22px/1.25 var(--font-heading); font-variant-numeric: tabular-nums; }
.example-text, .reviewed { font-size: 14px; line-height: 1.5; color: var(--muted); }
.example .button { margin-top: auto; align-self: flex-start; }
.faq details { padding: 16px 22px; }
.faq details + details { border-top: 1px solid var(--border); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 650; line-height: 1.4; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; color: var(--muted); background: linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 2px 100% no-repeat; }
.faq details[open] summary::after { background-size: 100% 2px, 0 0; }
.faq details p { margin-top: 10px; max-width: 640px; }

.card-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.calc-card a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; }
.calc-card a:hover { border-color: var(--field-border); }
.calc-card-title { font-weight: 700; }
.calc-card-meta, .calc-card-text { color: var(--muted); font-size: 14px; }
.calc-card-value { font-size: 14px; margin-top: 6px; }
.calc-card-value strong { font-weight: 750; }
.calc-card { position: relative; }
.calc-card .remove { position: absolute; top: 10px; right: 10px; }
.group-section { margin-top: 34px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.group-head h2 { font-size: 23px; }
.group-head a { text-decoration: none; }
.group-count, .group-description { color: var(--muted); font-size: 14px; }
.group-description { margin: 4px 0 14px; }
.group-head + .card-grid { margin-top: 14px; }
.card-grid-wide { margin-top: 26px; }
.empty-note { margin-top: 24px; color: var(--muted); }

.chooser-list { list-style: none; padding: 0; margin: 24px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 820px; }
.chooser-card { padding: 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.chooser-card h2 { font-size: 24px; }
.chooser-card p { color: var(--muted); }
.chooser-meta { font-size: 14px; }
.local-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--muted); max-width: 720px; }
.local-note svg { width: 20px; height: 20px; flex: none; color: var(--accent-strong); }
.empty-state { margin-top: 26px; padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-state p { color: var(--muted); max-width: 460px; }
.empty-icon { width: 44px; height: 44px; color: var(--accent); }
.remove { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--heart); cursor: pointer; display: grid; place-items: center; }
.remove svg { width: 16px; height: 16px; fill: currentColor; }
.pages { padding: 30px; max-width: 760px; }
.pages h1 { font-size: 36px; }
.pages h2 { font-size: 19px; margin: 24px 0 6px; }
.pages p { color: var(--muted); margin-bottom: 8px; }
.contact { margin: 22px 0 0; display: grid; gap: 6px; }
.contact div { display: flex; gap: 12px; }
.contact dt { font-weight: 650; min-width: 150px; }
.contact dd { margin: 0; color: var(--muted); }
.not-found { padding: 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 640px; margin: 20px auto 0; }
.not-found-code { font-size: 64px; color: var(--accent); line-height: 1; }
.not-found p { color: var(--muted); }

.search { width: min(860px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - 48px)); padding: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 24px 60px var(--shadow-pop); margin-top: 64px; }
.search[open] { display: flex; flex-direction: column; }
.search::backdrop { background: var(--overlay); }
.search-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.search-icon { width: 20px; height: 20px; color: var(--muted); flex: none; }
#search-input { flex: 1; min-width: 0; border: 0; background: none; font-size: 18px; padding: 6px 0; outline: none; }
#search-input::placeholder { color: var(--muted); opacity: 1; }
.search-head:focus-within { box-shadow: inset 0 -2px 0 var(--focus); }
.search-close { border: 1px solid var(--border); background: var(--surface-2); border-radius: 7px; font-size: 12px; padding: 4px 8px; cursor: pointer; color: var(--muted); }
.search-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.filter { border: 1px solid var(--field-border); background: var(--surface); border-radius: 999px; padding: 5px 13px; font-size: 14px; cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--seg-on); color: var(--seg-on-text); border-color: var(--seg-on); }
.search-body { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 0; flex: 1; overflow: hidden; }
.search-list { overflow-y: auto; padding: 10px 10px 14px; }
.search-body:has(.search-preview:empty) { grid-template-columns: 1fr; }
.search-preview { border-left: 1px solid var(--border); padding: 18px; overflow-y: auto; background: var(--surface-2); }
.search-status { padding: 6px 8px; }
.search-status.is-message { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-heading { padding: 12px 8px 6px; }
.result-option { display: flex; flex-direction: column; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.result-option[aria-selected="true"] { background: var(--chip); }
.result-option-title { font-weight: 650; }
.result-option-title mark { background: none; color: var(--accent-strong); font-weight: 800; }
.result-option-meta { font-size: 13px; color: var(--muted); }
.search-try { padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.try-word { border: 1px dashed var(--field-border); background: none; border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 14px; color: var(--text); }
.preview-title { font-size: 20px; margin: 6px 0 8px; }
.preview-text { color: var(--muted); font-size: 14px; }
.preview-example { margin-top: 16px; background: var(--result-bg); color: var(--result-text); border-radius: 12px; padding: 14px; }
.preview-example-value { font-size: 26px; color: var(--accent); margin-top: 4px; }
.preview-example-inputs { font-size: 13px; color: var(--result-muted); margin-top: 4px; }
.preview-open { margin-top: 16px; }
.search-keys { margin: 0; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }

.result-bar { display: none; }

.site-footer { background: var(--surface); border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.site-footer ul { display: flex; list-style: none; margin: 0; padding: 0; }
.site-footer li + li::before { content: "·"; margin: 0 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover, .footer-button:hover { text-decoration: underline; }
.footer-button { border: 0; background: none; padding: 0; cursor: pointer; }

@media (max-width: 860px) {
  .calc-grid, .row, .chooser-list { grid-template-columns: minmax(0, 1fr); }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .search-body { grid-template-columns: 1fr; }
  .search-preview { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .header-inner { gap: 12px; min-height: 56px; }
  .brand { --logo: 28px; }
  .brand-small { --logo: 26px; }
  .lang-switch { padding: 4px 7px; font-size: 13px; margin-left: 2px; }
  .header-tools { gap: 0; }
  .icon-button { width: 34px; }
  main.wrap { padding-top: 20px; padding-bottom: 96px; }
  .lead { font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .input-card, .result-card, .explain { padding: 18px; }
  .search { margin-top: 12px; max-height: calc(100vh - 24px); }
  .search-keys { display: none; }
  .result-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--result-bg); color: var(--result-text); text-decoration: none; box-shadow: 0 10px 30px var(--shadow-pop); border: 1px solid var(--result-border); }
  .page-calculator .site-footer { padding-bottom: 84px; }
  .result-bar-value { font-size: 22px; color: var(--accent); white-space: nowrap; }
  .contact div { flex-direction: column; gap: 0; }
}
@media (max-width: 480px) {
  .input-card > .half { grid-column: 1 / -1; }
}
dialog, dialog::backdrop { opacity: 0; transition: opacity .12s ease-out, transform .12s ease-out; }
dialog[open], [open]::backdrop { opacity: 1; transition-duration: .18s; }
@starting-style {
  dialog[open], [open]::backdrop { opacity: 0; }
  dialog[open] { transform: translateY(8px) scale(.98); }
}
@supports (overlay: auto) {
  dialog, dialog::backdrop { transition-property: opacity, transform, display, overlay; transition-behavior: allow-discrete; }
}
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }
.enter, .search-status { animation: enter .16s ease-out; }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after, ::backdrop { transition: none !important; animation: none !important; }
}
