@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;600;700;800&family=IBM+Plex+Mono:wght@500;600;700&family=Noto+Sans+JP:wght@500;600;700;800&display=swap");

:root {
  --paper: #f3efe6;
  --panel: #fffdf8;
  --ink: #171914;
  --muted: #6f756f;
  --line: #cdd0c7;
  --acid: #b5ff31;
  --coral: #ff705b;
  --blue: #6e78f5;
  --yellow: #ffd86f;
  --mint: #66dec0;
  --teal: #08765e;
  font-family: "DM Sans", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 0 0, rgb(110 120 245 / 14%), transparent 29rem), radial-gradient(circle at 100% 0, rgb(255 112 91 / 13%), transparent 31rem), var(--paper); }
button, textarea { font: inherit; }
button { color: inherit; }
code, pre, textarea { font-family: "IBM Plex Mono", monospace; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.page { width: min(1640px, calc(100% - 34px)); margin: 0 auto; padding: 28px 0 22px; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 34px; min-height: 212px; padding: 8px 14px 27px; }
.eyebrow, .section-heading p, .control-label { margin: 0; color: var(--teal); font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow i { width: 19px; height: 19px; border: 2px solid currentColor; border-radius: 5px; box-shadow: 6px 6px 0 var(--acid); }
h1 { margin: 13px 0 0; font-size: clamp(46px, 5.2vw, 82px); font-weight: 800; line-height: .94; letter-spacing: 0; }
.lead { margin: 22px 0 0; color: var(--muted); font-size: clamp(15px, 1.35vw, 21px); font-weight: 700; }
.lead strong { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.hero-actions button, .support-badge { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 13px; background: rgb(255 253 248 / 90%); font-size: 11px; font-weight: 800; }
.hero-actions button { cursor: pointer; }
.hero-actions .dark, .converter-actions .dark { color: white; border-color: var(--ink); background: var(--ink); }
.support-badge { display: grid; place-items: center; color: var(--teal); border-color: #9edbc9; background: #e8fff7; font-family: "IBM Plex Mono", monospace; }

.lab, .comparison, .converter, .reference { overflow: hidden; border: 1px solid var(--line); border-radius: 27px; background: var(--panel); box-shadow: 0 18px 50px rgb(28 31 24 / 9%); }
.section-heading { display: flex; align-items: center; gap: 14px; min-height: 86px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.section-heading.compact { min-height: 78px; }
.section-number { display: grid; place-items: center; flex: 0 0 auto; width: 49px; height: 49px; border-radius: 15px; color: white; background: var(--coral); font-family: "IBM Plex Mono", monospace; font-size: 13px; font-weight: 800; }
.section-number.blue { background: var(--blue); }
.section-number.yellow { color: var(--ink); background: var(--yellow); }
.section-heading h2 { margin: 3px 0 0; font-size: clamp(20px, 2vw, 30px); line-height: 1.1; }
.heading-status { display: flex; align-items: center; gap: 9px; margin-left: auto; color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.heading-status b { padding: 7px 10px; border-radius: 999px; color: white; background: var(--ink); }

.lab-grid { display: grid; grid-template-columns: 300px minmax(540px, 1fr) 330px; min-height: 830px; }
.controls { border-right: 1px solid var(--line); background: #faf7ef; }
.control-block { padding: 20px; border-bottom: 1px solid var(--line); }
.control-block.compact { padding-block: 17px; }
.control-block h3 { margin: 4px 0 14px; font-size: 17px; }
.control-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.control-row h3 { margin-bottom: 0; }
.control-row > span { color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; text-align: right; }
.mode-list { display: grid; gap: 7px; }
.mode-list button { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 9px; min-height: 59px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: left; cursor: pointer; }
.mode-list button > span { grid-row: 1 / 3; display: grid; place-items: center; align-self: center; width: 34px; height: 34px; border-radius: 9px; color: var(--blue); background: #eef0ff; font-size: 12px; font-weight: 800; }
.mode-list b { align-self: end; font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.mode-list small { color: var(--muted); font-size: 10px; font-weight: 700; }
.mode-list button[aria-pressed="true"] { color: white; border-color: var(--ink); background: var(--ink); }
.mode-list button[aria-pressed="true"] > span { color: var(--ink); background: var(--acid); }
.mode-list button[aria-pressed="true"] small { color: #bac0ba; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; margin-top: 13px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #eff0eb; }
.segmented button { min-height: 38px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 800; }
.segmented button[aria-pressed="true"] { color: white; background: var(--blue); box-shadow: 0 2px 8px rgb(50 54 120 / 18%); }
.family-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.family-grid button { min-height: 40px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; font-size: 10px; font-weight: 800; }
.family-grid button[aria-pressed="true"] { border-color: var(--ink); background: var(--acid); box-shadow: 3px 3px 0 var(--ink); }
.physical-pad { position: relative; width: 184px; height: 125px; margin: 15px auto 0; border: 2px solid var(--ink); border-radius: 18px; background: white; }
.physical-pad::after { content: "BOX"; position: absolute; inset: 29px 42px; display: grid; place-items: center; border: 1px dashed #adb2ab; border-radius: 10px; color: #949a94; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.physical-pad button { position: absolute; z-index: 2; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: #f4f4ef; cursor: pointer; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.physical-pad button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); background: var(--coral); box-shadow: 2px 2px 0 var(--ink); }
.physical-pad [data-physical="top"] { top: 5px; left: 50%; width: 58px; height: 24px; translate: -50% 0; }
.physical-pad [data-physical="right"] { right: 5px; top: 50%; width: 25px; height: 52px; translate: 0 -50%; writing-mode: vertical-rl; }
.physical-pad [data-physical="bottom"] { bottom: 5px; left: 50%; width: 58px; height: 24px; translate: -50% 0; }
.physical-pad [data-physical="left"] { left: 5px; top: 50%; width: 25px; height: 52px; translate: 0 -50%; writing-mode: vertical-rl; }
.physical-pad--size button { top: 50%; width: 70px; height: 38px; translate: 0 -50%; }
.physical-pad--size [data-physical="width"] { left: 14px; }
.physical-pad--size [data-physical="height"] { right: 14px; }
.physical-pad--radius button { width: 42px; height: 29px; }
.physical-pad--radius [data-physical="top-left"] { top: 5px; left: 5px; }
.physical-pad--radius [data-physical="top-right"] { top: 5px; right: 5px; }
.physical-pad--radius [data-physical="bottom-right"] { right: 5px; bottom: 5px; }
.physical-pad--radius [data-physical="bottom-left"] { bottom: 5px; left: 5px; }
.control-note { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; font-weight: 700; }

.stage { min-width: 0; padding: 18px; background: #e7ebe4; }
.browser-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 46px; padding: 0 14px; border: 1px solid #bec3ba; border-bottom: 0; border-radius: 15px 15px 0 0; background: #d7dcd4; }
.browser-bar p { display: flex; align-items: center; gap: 6px; margin: 0; color: #69716b; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.browser-bar p i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.browser-bar p i:nth-child(2) { background: var(--yellow); }
.browser-bar p i:nth-child(3) { background: var(--mint); }
.browser-bar span { color: var(--teal); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.flow-canvas { position: relative; display: grid; place-items: center; min-height: 680px; padding: 78px; overflow: hidden; border: 1px solid #bec3ba; background-color: #f8f5ed; background-image: linear-gradient(rgb(23 25 20 / 4%) 1px, transparent 1px), linear-gradient(90deg, rgb(23 25 20 / 4%) 1px, transparent 1px); background-size: 28px 28px; }
.demo-frame { display: grid; place-items: center; width: min(100%, 430px); height: 440px; border: 2px solid var(--ink); border-radius: 27px; background: rgb(255 253 248 / 74%); box-shadow: 11px 11px 0 rgb(23 25 20 / 11%); }
.demo-card { position: relative; width: 276px; height: 330px; padding: 26px; overflow: hidden; border: 2px solid var(--ink); border-radius: 18px; background: var(--panel); transition: all .25s ease; }
.demo-card > p { margin: 0 0 17px; color: var(--teal); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.demo-card h3 { margin: 0; font-size: 29px; line-height: 1.06; letter-spacing: 0; }
.demo-copy { margin: 19px 0; color: var(--muted); font-size: 11px; line-height: 1.65; font-weight: 700; }
.demo-card a { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 11px; font-weight: 800; text-decoration: none; }
.demo-card a span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--acid); }
.demo-card[data-writing^="vertical"] { width: 330px; height: 276px; }
.demo-card[data-writing^="vertical"] h3 { font-size: 27px; }
.demo-card[data-writing^="vertical"] .demo-copy { margin: 0 19px; }
.demo-card[data-writing^="vertical"] > p { margin: 0 0 0 17px; }
.demo-card.is-margin { background: #fffdf8; }
.demo-card.is-padding { background: #eef0ff; }
.demo-card.is-inset { background: #fff7df; }
.demo-card.is-size { background: #e9fff8; }

.side-label { position: absolute; z-index: 4; display: grid; gap: 3px; min-width: 106px; padding: 8px 10px; border: 1px solid #c9cdc5; border-radius: 9px; background: rgb(255 255 255 / 92%); box-shadow: 0 5px 15px rgb(23 25 20 / 8%); pointer-events: none; }
.side-label b { color: #7b827c; font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.side-label span { color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.side-label.is-active { border-color: var(--ink); background: var(--coral); box-shadow: 4px 4px 0 var(--ink); }
.side-label.is-active b, .side-label.is-active span { color: var(--ink); }
.side-label--top { top: 20px; left: 50%; translate: -50% 0; text-align: center; }
.side-label--right { right: 14px; top: 50%; translate: 0 -50%; }
.side-label--bottom { bottom: 18px; left: 50%; translate: -50% 0; text-align: center; }
.side-label--left { left: 14px; top: 50%; translate: 0 -50%; }

.axis { position: absolute; z-index: 3; display: flex; align-items: center; gap: 7px; color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; pointer-events: none; }
.axis i { position: relative; flex: 1; height: 2px; background: currentColor; }
.axis i::after { content: ""; position: absolute; top: 50%; right: 0; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-50%) rotate(45deg); }
.axis.is-reverse { flex-direction: row-reverse; }
.axis.is-reverse i::after { right: auto; left: 0; transform: translateY(-50%) rotate(-135deg); }
.axis--inline { left: 18%; right: 18%; bottom: 54px; }
.axis--block { top: 16%; bottom: 16%; right: 42px; flex-direction: column; color: var(--teal); writing-mode: vertical-rl; }
.axis--block i { width: 2px; height: auto; }
.axis--block i::after { top: auto; right: 50%; bottom: 0; transform: translateX(50%) rotate(135deg); }
.axis--block.is-reverse { flex-direction: column-reverse; }
.axis--block.is-reverse i::after { top: 0; bottom: auto; transform: translateX(50%) rotate(-45deg); }
.flow-canvas.is-vertical .axis--inline { top: 16%; bottom: 16%; left: 42px; right: auto; flex-direction: column; writing-mode: vertical-rl; }
.flow-canvas.is-vertical .axis--inline i { width: 2px; height: auto; }
.flow-canvas.is-vertical .axis--inline i::after { top: auto; right: 50%; bottom: 0; transform: translateX(50%) rotate(135deg); }
.flow-canvas.is-vertical .axis--inline.is-reverse { flex-direction: column-reverse; }
.flow-canvas.is-vertical .axis--inline.is-reverse i::after { top: 0; bottom: auto; transform: translateX(50%) rotate(-45deg); }
.flow-canvas.is-vertical .axis--block { left: 18%; right: 18%; top: auto; bottom: 54px; flex-direction: row; writing-mode: initial; }
.flow-canvas.is-vertical .axis--block i { width: auto; height: 2px; }
.flow-canvas.is-vertical .axis--block i::after { top: 50%; right: 0; bottom: auto; transform: translateY(-50%) rotate(45deg); }
.flow-canvas.is-vertical .axis--block.is-reverse { flex-direction: row-reverse; }
.flow-canvas.is-vertical .axis--block.is-reverse i::after { right: auto; left: 0; transform: translateY(-50%) rotate(-135deg); }

.computed-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) 16px auto; align-items: center; gap: 9px; min-height: 52px; padding: 0 14px; border: 1px solid #bec3ba; border-top: 0; border-radius: 0 0 15px 15px; background: white; }
.computed-bar span { color: var(--teal); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.computed-bar code { overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.computed-bar i { width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 5px; background: var(--coral); }
.computed-bar b { font-family: "IBM Plex Mono", monospace; font-size: 10px; }

.inspector { color: #f6f7ef; background: #1b1e19; }
.inspector > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 68px; padding: 0 18px; border-bottom: 1px solid #393d37; }
.inspector > header p, .map-head p { margin: 0; color: #9da39d; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.inspector > header span { padding: 6px 8px; border-radius: 999px; color: var(--ink); background: var(--acid); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.translation-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 18px; padding: 16px; border: 1px solid #484d45; border-radius: 15px; background: #242821; }
.translation-card div { min-width: 0; }
.translation-card small { display: block; margin-bottom: 8px; color: #8f978f; font-size: 10px; font-weight: 700; }
.translation-card code { display: block; overflow-wrap: anywhere; color: white; font-size: 10px; line-height: 1.5; font-weight: 700; }
.translation-card > span { color: var(--acid); font-size: 20px; }
.why-box { margin: 18px; padding: 16px; border: 1px solid #454a42; border-radius: 14px; background: #11140f; }
.why-box span { color: var(--yellow); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.why-box p { margin: 8px 0 0; color: #d9ddd7; font-size: 11px; line-height: 1.6; font-weight: 700; }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 18px 11px; }
.map-head span { color: #8f978f; font-size: 10px; }
.side-map { margin: 0; padding: 0; border-top: 1px solid #393d37; list-style: none; }
.side-map li { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 10px; min-height: 57px; padding: 9px 18px; border-bottom: 1px solid #393d37; }
.side-map li > span { display: grid; place-items: center; min-height: 28px; border: 1px solid #4d524a; border-radius: 8px; color: #aab0aa; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.side-map li code { color: #dce1da; font-size: 10px; }
.side-map li.is-active { background: #262b23; }
.side-map li.is-active > span { color: var(--ink); border-color: var(--coral); background: var(--coral); }
.side-map li.is-active code { color: var(--acid); }
.size-map { margin: 18px; overflow: hidden; border: 1px solid #454a42; border-radius: 12px; }
.size-map p { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: 0; padding: 0 12px; border-bottom: 1px solid #454a42; }
.size-map p:last-child { border-bottom: 0; }
.size-map span { color: #929992; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.size-map code { color: var(--mint); font-size: 10px; }

.comparison, .converter { margin-top: 18px; }
.comparison-grid { display: grid; grid-template-columns: 300px minmax(540px, 1fr) 330px; min-height: 610px; }
.comparison-controls { border-right: 1px solid var(--line); background: #faf7ef; }
.comparison-controls h3 { margin: 4px 0 10px; font-size: 17px; line-height: 1.4; }
.comparison-note { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.6; }
.comparison-mode-list { display: grid; gap: 7px; margin-top: 13px; }
.comparison-mode-list button { min-height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 800; text-align: left; }
.comparison-mode-list button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); background: var(--acid); box-shadow: 3px 3px 0 var(--ink); }
.comparison-syntax button[aria-pressed="true"] { color: var(--ink); background: var(--coral); }
.comparison-preview { min-width: 0; padding: 18px; background: #e7ebe4; }
.intent-canvas { position: relative; display: grid; place-items: center; min-height: 470px; overflow: hidden; border: 1px solid #bec3ba; background-color: #f8f5ed; background-image: linear-gradient(rgb(23 25 20 / 4%) 1px, transparent 1px), linear-gradient(90deg, rgb(23 25 20 / 4%) 1px, transparent 1px); background-size: 28px 28px; }
.intent-box { box-sizing: border-box; width: 390px; height: 310px; overflow: hidden; border: 2px solid var(--ink); border-radius: 24px; background: var(--coral); box-shadow: 10px 10px 0 rgb(23 25 20 / 12%); transition: padding .28s ease; }
.intent-content { width: 100%; height: 100%; padding: 25px; border: 1px solid var(--ink); border-radius: 18px; background: var(--panel); }
.intent-content p { margin: 0 0 18px; color: var(--teal); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.intent-content h3 { margin: 0; font-size: 31px; line-height: 1.08; letter-spacing: 0; }
.intent-content > span { display: block; margin-top: 24px; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.7; }
.intent-box[data-writing^="vertical"] .intent-content { padding: 23px; }
.intent-box[data-writing^="vertical"] .intent-content p { margin: 0 0 0 18px; }
.intent-box[data-writing^="vertical"] .intent-content h3 { font-size: 27px; }
.intent-box[data-writing^="vertical"] .intent-content > span { margin: 0 22px 0 0; }
.intent-marker { position: absolute; z-index: 3; display: flex; align-items: center; gap: 9px; color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 800; pointer-events: none; }
.intent-marker i { display: block; width: 54px; height: 2px; background: currentColor; }
.intent-canvas[data-expected="top"] .intent-marker { top: 33px; left: 50%; flex-direction: column; translate: -50% 0; }
.intent-canvas[data-expected="top"] .intent-marker i, .intent-canvas[data-expected="bottom"] .intent-marker i { width: 2px; height: 44px; }
.intent-canvas[data-expected="bottom"] .intent-marker { bottom: 33px; left: 50%; flex-direction: column-reverse; translate: -50% 0; }
.intent-canvas[data-expected="left"] .intent-marker { left: 26px; top: 50%; translate: 0 -50%; }
.intent-canvas[data-expected="right"] .intent-marker { right: 26px; top: 50%; flex-direction: row-reverse; translate: 0 -50%; }
.comparison-codebar { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 1px solid #bec3ba; border-top: 0; border-radius: 0 0 15px 15px; background: white; }
.comparison-codebar span { color: var(--teal); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.comparison-codebar code { overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.comparison-result { padding: 24px; color: white; background: var(--ink); }
.comparison-result > p:first-child { margin: 0 0 13px; color: #9da39d; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.comparison-result > strong { display: block; min-height: 72px; color: var(--coral); font-size: 27px; line-height: 1.15; }
.comparison-result.is-matched > strong { color: var(--acid); }
.comparison-result dl { display: grid; grid-template-columns: 1fr 1fr; margin: 25px 0; border: 1px solid #444840; border-radius: 13px; overflow: hidden; }
.comparison-result dl div { padding: 14px; }
.comparison-result dl div + div { border-left: 1px solid #444840; }
.comparison-result dt { color: #939a93; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.comparison-result dd { margin: 7px 0 0; color: var(--acid); font-family: "IBM Plex Mono", monospace; font-size: 18px; font-weight: 800; }
.comparison-explanation { padding: 17px; border: 1px solid #454a42; border-radius: 14px; background: #10130f; }
.comparison-explanation span { color: var(--yellow); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.comparison-explanation p { margin: 9px 0 0; color: #d9ddd7; font-size: 11px; font-weight: 700; line-height: 1.7; }
.comparison-guidance { margin: 20px 0 0; color: #aeb4ad; font-size: 11px; font-weight: 700; line-height: 1.7; }
.converter-actions { display: flex; gap: 8px; margin-left: auto; }
.converter-actions button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; font-size: 10px; font-weight: 800; }
.converter-grid { display: grid; grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr); padding: 24px; background: #e7ebe4; }
.editor-panel { min-width: 0; overflow: hidden; border: 2px solid var(--ink); border-radius: 17px; background: var(--panel); box-shadow: 7px 7px 0 rgb(23 25 20 / 11%); }
.editor-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 0 15px; border-bottom: 1px solid var(--line); }
.editor-panel > header div { display: grid; gap: 3px; }
.editor-panel > header span { color: var(--teal); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.editor-panel > header b { font-size: 12px; }
.editor-panel > header small { color: var(--muted); font-size: 10px; font-weight: 700; }
.editor-panel label { position: absolute; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; }
.editor-panel textarea, .editor-panel pre { display: block; width: 100%; height: 350px; margin: 0; padding: 21px; resize: vertical; border: 0; color: #eaf0e6; background: #171a16; font-size: 12px; line-height: 1.75; tab-size: 2; }
.editor-panel textarea { outline: 0; }
.output-panel { border-color: var(--blue); }
.output-panel pre { overflow: auto; }
.output-panel code { white-space: pre-wrap; }
.convert-bridge { display: grid; place-items: center; align-content: center; gap: 11px; color: var(--blue); }
.convert-bridge span, .convert-bridge small { font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.convert-bridge b { display: grid; place-items: center; width: 47px; height: 47px; border: 2px solid var(--ink); border-radius: 50%; color: var(--ink); background: var(--acid); box-shadow: 4px 4px 0 var(--ink); font-size: 22px; }
.convert-bridge small { color: var(--muted); writing-mode: vertical-rl; }
.converter-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; padding: 12px 24px; border-top: 1px solid var(--line); }
.converter-footer p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; font-weight: 700; }
.converter-footer p:first-child { display: flex; align-items: center; gap: 10px; }
.converter-footer b { color: var(--ink); }
.converter-footer span { padding: 6px 8px; border-radius: 7px; color: white; background: var(--blue); font-family: "IBM Plex Mono", monospace; }

.reference { margin-top: 18px; }
.reference-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.reference-grid article { min-height: 238px; padding: 28px; border-right: 1px solid var(--line); }
.reference-grid article:last-child { border-right: 0; }
.reference-grid > article > span { color: var(--teal); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.reference-grid h3 { margin: 31px 0 12px; font-size: clamp(19px, 1.8vw, 27px); }
.reference-grid p { min-height: 48px; margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.6; font-weight: 700; }
.reference-grid code { display: block; margin-top: 5px; padding: 10px; overflow: auto; border-radius: 8px; color: #eaf0e6; background: var(--ink); font-size: 10px; white-space: nowrap; }
.page-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 14px 5px; color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.page-footer a { color: var(--ink); }

@media (max-width: 1280px) {
  .lab-grid { grid-template-columns: 280px minmax(500px, 1fr); }
  .inspector { grid-column: 1 / -1; display: grid; grid-template-columns: 280px minmax(260px, 1fr) minmax(360px, 1.4fr); align-items: start; }
  .inspector > header { grid-column: 1 / -1; }
  .translation-card { grid-column: 1; }
  .why-box { grid-column: 1; }
  .map-head { grid-column: 2 / -1; }
  .side-map { grid-column: 2; grid-row: 2 / 4; border-left: 1px solid #393d37; }
  .size-map { grid-column: 3; grid-row: 2; }
  .comparison-grid { grid-template-columns: 280px minmax(500px, 1fr); }
  .comparison-result { grid-column: 1 / -1; }
}

@media (max-width: 940px) {
  .hero { display: block; }
  .hero-actions { justify-content: flex-start; margin-top: 24px; }
  .lab-grid { grid-template-columns: 1fr; }
  .controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .mode-list { grid-template-columns: repeat(3, 1fr); }
  .family-grid { grid-template-columns: repeat(3, 1fr); }
  .inspector { grid-column: auto; grid-template-columns: 1fr 1fr; }
  .inspector > header { grid-column: 1 / -1; }
  .translation-card, .why-box, .map-head, .side-map, .size-map { grid-column: auto; grid-row: auto; }
  .map-head { grid-column: 1 / -1; }
  .side-map { border-left: 0; }
  .comparison-grid { grid-template-columns: 1fr; }
  .comparison-controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .comparison-mode-list { grid-template-columns: repeat(3, 1fr); }
  .comparison-result { grid-column: auto; }
  .converter-grid { grid-template-columns: 1fr; gap: 16px; }
  .convert-bridge { grid-auto-flow: column; justify-content: center; }
  .convert-bridge small { writing-mode: initial; }
}

@media (max-width: 640px) {
  .page { width: min(100% - 18px, 1640px); padding-top: 16px; }
  .hero { min-height: 0; padding: 10px 7px 22px; }
  h1 { font-size: clamp(38px, 12vw, 56px); }
  .lead { font-size: 14px; line-height: 1.5; }
  .support-badge { width: 100%; }
  .section-heading { padding: 15px; }
  .heading-status { display: none; }
  .mode-list { grid-template-columns: 1fr; }
  .comparison-mode-list { grid-template-columns: 1fr; }
  .family-grid { grid-template-columns: repeat(2, 1fr); }
  .stage { padding: 10px; }
  .browser-bar span { display: none; }
  .flow-canvas { min-height: 610px; padding: 64px 48px; }
  .comparison-preview { padding: 10px; }
  .intent-canvas { min-height: 440px; }
  .intent-box { width: 280px; height: 300px; }
  .intent-box[data-writing^="vertical"] { width: 300px; height: 280px; }
  .intent-marker { scale: .86; }
  .demo-frame { height: 390px; }
  .demo-card { scale: .82; }
  .side-label { min-width: 84px; padding: 7px; }
  .side-label--left { left: 6px; }
  .side-label--right { right: 6px; }
  .axis--block { right: 20px; }
  .flow-canvas.is-vertical .axis--inline { left: 20px; }
  .computed-bar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .computed-bar i { display: none; }
  .inspector { grid-template-columns: 1fr; }
  .map-head { grid-column: auto; }
  .converter-actions { display: none; }
  .converter-grid { padding: 12px; }
  .editor-panel textarea, .editor-panel pre { height: 310px; padding: 15px; font-size: 10px; }
  .converter-footer { display: grid; }
  .reference-grid { grid-template-columns: 1fr; }
  .reference-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .page-footer { display: grid; }
}

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