@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/inter.woff2) format("woff2-variations");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/jetbrains-mono.woff2) format("woff2");
}

:root {
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
  --wrap: 1120px;
}

:root[data-theme="light"] {
  --bg: #F6F2E9;
  --bg-soft: #F1ECE0;
  --surface: #FFFDF7;
  --surface-2: #F4EFE3;
  --ink: #19180F;
  --ink-2: #4E4A3D;
  --ink-3: #716A59;
  --line: #DDD5C2;
  --line-strong: #C3B9A1;
  --accent: #1D46C4;
  --accent-ink: #FFFFFF;
  --accent-soft: #E8ECFA;
  --ok: #1F6B45;
  --warn: #8A4B12;
  --dot: rgba(25, 24, 15, .11);
  --shadow: 0 1px 2px rgba(25, 24, 15, .05), 0 18px 40px -30px rgba(25, 24, 15, .5);
  --card-shadow: 0 1px 2px rgba(25, 24, 15, .06), 0 24px 48px -34px rgba(25, 24, 15, .45);
}

:root[data-theme="dark"] {
  --bg: #131311;
  --bg-soft: #191917;
  --surface: #1B1B18;
  --surface-2: #232320;
  --ink: #F2EEE1;
  --ink-2: #C0BAAB;
  --ink-3: #8C8676;
  --line: #312F29;
  --line-strong: #48453C;
  --accent: #93A8FF;
  --accent-ink: #12120F;
  --accent-soft: #232740;
  --ok: #7FD1A4;
  --warn: #E0B075;
  --dot: rgba(242, 238, 225, .07);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -30px rgba(0, 0, 0, .9);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 24px 48px -30px rgba(0, 0, 0, .9);
}

*, *::before, *::after { box-sizing: border-box; }

#studio, #why, #faq, #main { scroll-margin-top: 78px; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="ko"] body {
  font-family: "Pretendard Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
}
html[lang="ko"] .mono, html[lang="ko"] code, html[lang="ko"] .mono-label { font-family: var(--mono); }

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.022em; line-height: 1.12; }

p { margin: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px;
  border-radius: 6px; text-decoration: none; font-size: 14px;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

.mono { font-family: var(--mono); font-variant-ligatures: none; }

.mono-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--accent);
  display: inline-block;
}

.label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}

.hint {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-3);
  margin-top: 8px;
  max-width: 52ch;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  font-size: 14px;
}
.text-link:hover { color: var(--ink); border-color: var(--ink); }

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.brand-mark { width: 24px; height: 24px; }
.brand-name { font-weight: 600; letter-spacing: -0.02em; }
.brand-tool {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 2px;
}
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a {
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-color: var(--line-strong); }

.header-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.lang-field { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-3); }
.lang-globe { width: 15px; height: 15px; }
.lang-field select {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  padding: 6px 4px;
  cursor: pointer;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink-2);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--line); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
:root[data-theme="light"] .ico-sun { display: none; }
:root[data-theme="dark"] .ico-moon { display: none; }

/* hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 56px;
  align-items: center;
  padding-top: 66px;
  padding-bottom: 54px;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 16ch;
  text-wrap: balance;
}
.hero-lede {
  margin-top: 20px;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 48ch;
}
.hero-actions { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 7px;
  padding: 11px 20px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hero-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 38px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.facts dt {
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.facts dd {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-3);
}

.hero-sheet {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--card-shadow);
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.1px);
  background-size: 15px 15px;
  background-position: 0 0;
}
.sample-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sample {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 8px 10px;
}
.sample-qr { width: 100%; max-width: 112px; height: auto; image-rendering: pixelated; border-radius: 2px; }
.sample-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}
.hero-sheet figcaption {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-3);
  text-align: center;
}

/* studio */
.studio { padding-top: 56px; }
.section-head { max-width: 720px; margin-bottom: 26px; }
.section-head h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.028em;
}
.section-lede {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 54ch;
  text-wrap: pretty;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .78fr);
  gap: 16px;
  align-items: stretch;
}

.sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.builder {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 0;
  overflow: hidden;
}
.preset-rail {
  border-right: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.preset {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.preset:hover { background: var(--surface); color: var(--ink); }
.preset[aria-selected="true"] {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}
.preset-num {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.preset[aria-selected="true"] .preset-num { color: var(--accent); }

.fields {
  padding: 20px 22px 22px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.field-panel {
  min-width: 0;
  width: 100%;
}
.field-panel[hidden] { display: none; }
.field-panel > * + * { margin-top: 14px; }
.field-panel > .hint { margin-top: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row > * + * { margin-top: 0; }

.field { display: block; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  line-height: 1.4;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 72px; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-3); opacity: .95; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface);
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.check input { width: 15px; height: 15px; accent-color: var(--accent); }

.payload-line {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--line);
  padding: 12px 22px 14px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 48px;
}
.payload-text {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.payload-text:empty::before {
  content: "—";
  color: var(--line-strong);
}

/* preview */
.preview-panel {
  position: sticky;
  top: 78px;
  align-self: start;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.preview-meta { font-size: 10.5px; color: var(--ink-3); letter-spacing: .02em; }
.qr-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 288px;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  background-image:
    linear-gradient(45deg, var(--dot) 25%, transparent 25%, transparent 75%, var(--dot) 75%),
    linear-gradient(45deg, var(--dot) 25%, transparent 25%, transparent 75%, var(--dot) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}
#qrCanvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 10px 24px -18px rgba(0, 0, 0, .5);
}
#qrCanvas[hidden] { display: none; }
.qr-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.qr-empty[hidden] { display: none; }

.status {
  font-size: 12px;
  line-height: 1.5;
  min-height: 18px;
  color: var(--ink-3);
}
.warn-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border-left: 2px solid var(--warn);
  padding: 7px 10px;
  border-radius: 0 4px 4px 0;
}
.warn-note[hidden] { display: none; }
#exportCustom { margin-top: 10px; display: inline-block; }
#exportCustom[hidden] { display: none; }
.status.is-ok { color: var(--ok); }
.status.is-warn { color: var(--warn); }

.exports { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.export {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
}
.export:hover { border-color: var(--accent); background: var(--accent-soft); }
.export:active { transform: translateY(1px); }
.export-wide { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; }
.export-name { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.export-sub {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* design */
.design { margin-top: 16px; padding: 20px 22px 22px; }
.design-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.design-head h3 { font-size: 15px; letter-spacing: -.01em; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid var(--line-strong);
}
.link-btn:hover { color: var(--ink); }

.design-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}
.design-group { min-width: 0; }
.design-group .label { margin-bottom: 9px; }

.palette { display: flex; gap: 7px; margin-bottom: 11px; }
.chip {
  width: 26px; height: 26px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, var(--c1) 0 50%, var(--c2) 50% 100%);
  cursor: pointer;
  padding: 0;
}
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }

.color-row { display: flex; gap: 14px; flex-wrap: wrap; }
.color-field { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.color-field input[type="color"] {
  width: 26px; height: 26px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: none;
  cursor: pointer;
}
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.color-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.color-field input[type="color"]::-moz-color-swatch { border: 0; border-radius: 4px; }
.color-label { font-size: 12.5px; color: var(--ink-2); }
.color-value { font-size: 10px; color: var(--ink-3); letter-spacing: .02em; }

.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-2);
}
.segmented label { flex: 1; position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: block;
  text-align: center;
  padding: 7px 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}
.segmented input:checked + span { background: var(--ink); color: var(--bg); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -3px; }

.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
  height: 22px;
}
.range-row output {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
  min-width: 26px;
  text-align: right;
}

/* why */
.why { padding-top: 72px; padding-bottom: 8px; }
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.why-card { border-top: 1px solid var(--ink); padding-top: 16px; }
.why-card h3 { font-size: 17px; letter-spacing: -.015em; }
.why-card p { margin-top: 10px; font-size: 14px; line-height: 1.65; color: var(--ink-2); }

/* limits */
.limits {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: 56px;
  align-items: start;
  padding-top: 64px;
  padding-bottom: 8px;
}
.limits-copy h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.limits-table { width: 100%; border-collapse: collapse; }
.limits-table th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
  text-align: left;
  padding: 0 0 9px;
  border-bottom: 1px solid var(--ink);
}
.limits-table td {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.limits-table td.mono { font-size: 12.5px; color: var(--ink-2); }
.limits-table th:not(:first-child), .limits-table td:not(:first-child) { text-align: right; }

/* privacy strip */
.priv-strip { padding-top: 64px; }
.priv-inner {
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  padding: 36px 38px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
}
.priv-inner h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); color: var(--bg); }
.priv-inner p { font-size: 14px; line-height: 1.65; color: color-mix(in srgb, var(--bg) 78%, transparent); }
.priv-inner .text-link { color: var(--bg); margin-top: 14px; display: inline-block; }
.priv-inner > a { grid-column: 1; }

/* faq */
.faq { padding-top: 72px; }
.faq-list { max-width: 820px; border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 34px 16px 0;
  position: relative;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -.01em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 13px;
  font-family: var(--mono);
  font-size: 17px;
  color: var(--ink-3);
}
.qa[open] summary::after { content: "−"; color: var(--accent); }
.qa summary:hover { color: var(--accent); }
.qa p {
  padding: 0 34px 18px 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 68ch;
}

/* document pages */
.narrow { max-width: 780px; }
.doc { padding-top: 56px; }
.doc h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); letter-spacing: -.032em; }
.updated {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lede-doc {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 58ch;
}
.doc h2 {
  margin-top: 38px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 18px;
  letter-spacing: -.015em;
}
.doc p { margin-top: 12px; font-size: 15px; line-height: 1.72; color: var(--ink-2); }
.doc p a, .doc li a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.doc p a:hover, .doc li a:hover { border-color: var(--accent); }
.doc ul { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.doc b, .doc strong { color: var(--ink); font-weight: 600; }

/* footer */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); padding: 44px 0 30px; }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .8fr);
  gap: 32px;
}
.footer-brand p { margin-top: 12px; font-size: 13px; line-height: 1.6; color: var(--ink-3); max-width: 34ch; }
.footer-links h3 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
  margin-bottom: 12px;
}
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-links a { font-size: 13px; color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); border-bottom: 1px solid var(--line-strong); }
.footer-note {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--ink-3);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* print sheet */
.print-sheet { display: none; }

@media print {
  @page { size: A4 portrait; margin: 14mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet {
    display: block;
    font-family: var(--sans);
  }
  .print-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #999;
    padding-bottom: 4mm;
    margin-bottom: 6mm;
    font-size: 9pt;
  }
  .print-head strong { font-size: 11pt; font-weight: 600; }
  .print-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5mm;
  }
  .print-item {
    border: 1px dashed #bbb;
    padding: 3mm;
    text-align: center;
    break-inside: avoid;
  }
  .print-item img { width: 49mm; height: 49mm; display: block; margin: 0 auto; }
  .print-item figcaption {
    margin-top: 2mm;
    font-size: 7.5pt;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding-top: 44px; }
  .hero h1 { max-width: 22ch; }
  .hero-sheet { max-width: 520px; }
  .workbench { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .qr-stage { min-height: 260px; }
  .design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limits { grid-template-columns: 1fr; gap: 28px; }
  .priv-inner { grid-template-columns: 1fr; gap: 18px; }
  .why-grid { grid-template-columns: 1fr; gap: 22px; }
  .site-nav { display: none; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .preview-head { flex-direction: column; align-items: flex-start; gap: 3px; }
  .preview-meta { font-size: 10px; }
  .header-inner { height: 56px; gap: 12px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .builder { grid-template-columns: 1fr; }
  .preset-rail {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px;
    gap: 4px;
    scrollbar-width: none;
  }
  .preset-rail::-webkit-scrollbar { display: none; }
  .preset { width: auto; white-space: nowrap; padding: 7px 10px; }
  .preset[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--accent); }
  .fields { padding: 16px 16px 18px; min-height: 0; }
  .field-row { grid-template-columns: 1fr; }
  .payload-line { padding: 10px 16px 13px; flex-direction: column; gap: 4px; }
  .design { padding: 16px; }
  .design-grid { grid-template-columns: 1fr; gap: 20px; }
  .exports { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .priv-inner { padding: 26px 22px; }
  .hero { padding-bottom: 40px; }
  .studio { padding-top: 40px; }
  .why, .limits, .faq { padding-top: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Pikkola Text: additions on top of the shared sheet ---------- */

.btn-small { padding: 7px 14px; font-size: 13px; }

/* hero before and after */
.paste-demo { display: flex; flex-direction: column; gap: 10px; }
.demo-pane {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px 14px;
}
.demo-before .demo-line { color: color-mix(in srgb, var(--warn) 80%, var(--ink)); }
.demo-before .demo-line + .demo-line { margin-top: 2px; }
.demo-after { border-color: var(--line-strong); background: var(--ink); }
.demo-after .mono-label { color: color-mix(in srgb, var(--bg) 62%, transparent); }
.demo-after .demo-line { color: var(--bg); font-size: 15px; line-height: 1.55; margin-top: 8px; }
.demo-meta { margin-top: 10px; font-size: 9.5px; letter-spacing: .06em; color: color-mix(in srgb, var(--bg) 55%, transparent); }
.demo-line { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.demo-arrow { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-3); }
.demo-arrow svg { width: 15px; height: 15px; }
.demo-arrow .mono { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; }
.paste-demo figcaption {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-3);
  text-align: center;
}

/* workbench */
.text-workbench { grid-template-columns: minmax(0, 1.32fr) minmax(320px, .78fr); align-items: start; }

.editor-card { display: flex; flex-direction: column; overflow: hidden; }
.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.editor-tools { display: flex; gap: 14px; }

#text {
  width: 100%;
  min-height: 356px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.72;
  padding: 16px 18px;
  resize: vertical;
  outline: none;
  tab-size: 2;
}
#text::placeholder { color: var(--ink-3); opacity: .9; }
#text:focus { background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent); }

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.stat { padding: 10px 12px 11px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-v { display: block; font-size: 15px; color: var(--ink); letter-spacing: -.01em; }
.stat-l { display: block; margin-top: 2px; font-size: 10px; line-height: 1.35; color: var(--ink-3); }

.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
}
.selection-info { font-size: 10.5px; color: var(--ink-3); letter-spacing: .02em; }

/* toolbox */
.toolbox { padding: 16px 16px 14px; }
.toolbox-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.toolbox-note { font-size: 9px; color: var(--ink-3); letter-spacing: .04em; }

.tool-group + .tool-group { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line); }
.tool-title {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
  margin-bottom: 8px;
}
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 4px; }
.tool-grid-2 { grid-template-columns: 1fr 1fr; }
.tool {
  text-align: left;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 7px 9px;
  cursor: pointer;
}
.tool-grid-2 .tool { font-size: 11.5px; }
.tool:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.tool:active { transform: translateY(1px); }
.tool:disabled { opacity: .38; cursor: default; transform: none; }
.toolbox .status { margin-top: 12px; }

/* case table */
.cases { padding-top: 64px; }
.case-table {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.case-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-2);
  align-items: baseline;
}
.case-row:last-child { border-bottom: 0; }
.case-row:nth-child(even) { background: var(--bg-soft); }
.case-head {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface-2) !important;
  border-bottom: 1px solid var(--line-strong);
}
.case-name { font-size: 11.5px; color: var(--ink); white-space: nowrap; }
.case-value { font-size: 12.5px; color: var(--ink); overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .text-workbench { grid-template-columns: 1fr; }
  .toolbox { position: static; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .tool-grid-2 { grid-template-columns: 1fr 1fr; }
  .cases { padding-top: 48px; }
}

@media (max-width: 640px) {
  #text { min-height: 260px; font-size: 14.5px; padding: 14px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3n) { border-right: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .case-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; padding: 9px 12px; }
  .case-row > span:last-child { display: none; }
  .case-head > span:last-child { display: none; }
}

/* invisibles panel */
.invisible-view {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding: 12px 16px 14px;
}
.invisible-view[hidden] { display: none; }
.invisible-text {
  margin: 8px 0 0;
  max-height: 180px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* toast for the clipboard */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 10px);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 60;
  max-width: min(92vw, 420px);
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media print { .toast { display: none; } }

/* Korean headings break at spaces, not inside a word */
html[lang="ko"] h1,
html[lang="ko"] h2,
html[lang="ko"] h3,
html[lang="ko"] .hero-lede,
html[lang="ko"] .section-lede,
html[lang="ko"] .hero h1 { word-break: keep-all; }

/* ---------- Pikkola Regex: additions on top of the shared sheet ---------- */

.btn-small { padding: 7px 14px; font-size: 13px; }

/* hero demo */
.match-demo { display: flex; flex-direction: column; gap: 10px; }
.demo-pane {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px 14px;
}
.demo-pattern { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.demo-pattern .tok { color: var(--accent); }
.demo-text { background: var(--surface); }
.demo-sentence { margin-top: 7px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.demo-meta { margin-top: 10px; font-size: 9.5px; letter-spacing: .06em; color: var(--ink-3); }
mark.hl-a { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); box-shadow: inset 0 -1.5px 0 var(--accent); }
mark.hl-b { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--ink); box-shadow: inset 0 -1.5px 0 color-mix(in srgb, var(--accent) 55%, transparent); }
.match-demo figcaption {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-3);
  text-align: center;
}

/* workbench */
.regex-workbench { grid-template-columns: minmax(0, 1.3fr) minmax(320px, .78fr); align-items: start; }
.editor-card { overflow: hidden; }

.pattern-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.slash { font-size: 15px; color: var(--ink-3); }
.pattern-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  padding: 3px 2px;
  outline: none;
}
.pattern-input::placeholder { color: var(--ink-3); opacity: .85; }
.pattern-input:focus { background: var(--surface); box-shadow: inset 0 -2px 0 var(--accent); }

.flag-set { display: flex; gap: 3px; flex: none; }
.flag { cursor: pointer; }
.flag input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.flag span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-3);
  font-size: 11.5px;
}
.flag input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.flag input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.flag span:hover { border-color: var(--line-strong); }

.flag-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 7px 14px;
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.regex-status { padding: 8px 14px; min-height: 34px; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.regex-status.is-ok { color: var(--ok); }
.regex-status.is-warn { color: var(--warn); }

.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.editor-tools { display: flex; gap: 14px; }

/* highlight layer */
.hl-wrap { position: relative; height: 348px; background: var(--surface); }
.hl-layer,
.hl-input {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 14px 16px;
  border: 0;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.78;
  letter-spacing: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  tab-size: 2;
  overflow: auto;
}
.hl-layer { color: var(--ink); pointer-events: none; }
.hl-layer mark { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); box-shadow: inset 0 -1.5px 0 var(--accent); }
.hl-layer mark.hl-b { background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 0 -1.5px 0 color-mix(in srgb, var(--accent) 55%, transparent); }
.hl-layer mark.is-sel { box-shadow: inset 0 0 0 1.5px var(--accent); border-radius: 2px; }
.hl-input {
  background: transparent;
  color: transparent;
  caret-color: var(--ink);
  resize: none;
  outline: none;
  z-index: 2;
}
.hl-input::placeholder { color: var(--ink-3); opacity: .9; }
.hl-input::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }

/* side cards */
.regex-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.side-card { padding: 14px 14px 12px; }
.side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.side-head h3 {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}
.side-count { font-size: 10.5px; color: var(--accent); letter-spacing: .04em; }
.side-empty { font-size: 12px; line-height: 1.5; color: var(--ink-3); }

.match-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 196px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.match-list:empty { display: none; }
.match-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 5px 7px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-2);
}
.match-item:hover { background: var(--surface-2); }
.match-item.is-sel { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink); }
.m-num { font-size: 9.5px; color: var(--ink-3); }
.m-text { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-pos { font-size: 9.5px; color: var(--ink-3); text-align: right; }
.match-note { padding: 6px 7px; font-size: 10.5px; color: var(--ink-3); }

.group-table { width: 100%; border-collapse: collapse; }
.group-table:empty { display: none; }
.group-table th, .group-table td {
  text-align: left;
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.group-table tr:last-child th, .group-table tr:last-child td { border-bottom: 0; }
.group-name { font-size: 9.5px; letter-spacing: .04em; color: var(--ink-3); white-space: nowrap; width: 40%; font-weight: 400; }
.group-value { font-size: 11.5px; color: var(--ink); overflow-wrap: anywhere; }

.replace-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12.5px;
  padding: 7px 9px;
  outline: none;
}
.replace-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.replace-input::placeholder { color: var(--ink-3); }
.replace-out {
  margin: 9px 0 0;
  padding: 10px 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 64px;
  max-height: 168px;
  overflow: auto;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.replace-out.is-empty { color: var(--ink-3); }
.side-card .hint { font-size: 11px; margin-top: 8px; }

/* presets */
.presets { padding-top: 68px; }
.preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.preset-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  min-width: 0;
}
.preset-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.preset-card.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.preset-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.preset-num { font-size: 9px; letter-spacing: .08em; color: var(--ink-3); }
.preset-flags { font-size: 9px; color: var(--accent); letter-spacing: .04em; }
.preset-name { font-size: 13.5px; font-weight: 500; letter-spacing: -.01em; }
.preset-pattern {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* code */
.code-section { padding-top: 68px; }
.code-card { overflow: hidden; }
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  flex-wrap: wrap;
}
.code-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.code-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 5px 9px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--ink-3);
  cursor: pointer;
}
.code-tab:hover { color: var(--ink); background: var(--surface); }
.code-tab.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.code-block {
  margin: 0;
  padding: 18px 18px 20px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  line-height: 1.7;
  overflow: auto;
  max-height: 420px;
  white-space: pre;
  tab-size: 2;
}
.code-note { padding: 10px 16px 12px; margin: 0; max-width: none; border-top: 1px solid var(--line); }

/* flags table */
.flags-table td:last-child { text-align: left; font-size: 13.5px; }

@media (max-width: 1080px) {
  .preset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .regex-workbench { grid-template-columns: 1fr; }
  .regex-side { flex-direction: column; }
  .hl-wrap { height: 300px; }
  .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pattern-bar { flex-wrap: wrap; padding: 10px 12px; }
  .pattern-input { font-size: 14px; }
  .flag-legend { display: none; }
  .hl-wrap { height: 260px; }
  .hl-layer, .hl-input { font-size: 12.5px; padding: 12px; }
  .preset-grid { grid-template-columns: 1fr; }
  .code-block { font-size: 11px; padding: 14px; }
  .code-head { padding: 9px 12px; }
}

html[lang="ko"] h1, html[lang="ko"] h2, html[lang="ko"] h3,
html[lang="ko"] .hero-lede, html[lang="ko"] .section-lede { word-break: keep-all; }

/* the payload strip starts empty rather than with a dash */
.payload-text:empty::before { content: ""; }

/* reference sections read better full width than in two columns */
.limits-wide { grid-template-columns: 1fr; gap: 22px; padding-top: 64px; }
.limits-wide .limits-copy { max-width: 700px; }
.limits-wide .limits-copy h2 { margin-bottom: 0; }
.limits-wide .limits-table { width: 100%; }
.limits-wide .limits-table td, .limits-wide .limits-table th { padding-right: 18px; }
.limits-wide .limits-table td:last-child, .limits-wide .limits-table th:last-child { padding-right: 0; }
.limits-wide .limits-table th:not(:first-child), .limits-wide .limits-table td:not(:first-child) { text-align: left; }
.limits-wide .limits-table td.mono { white-space: nowrap; }

@media (max-width: 640px) {
  .pattern-bar { flex-wrap: wrap; row-gap: 6px; }
  .pattern-input { flex: 1 1 0; }
  .flag-set { flex: 1 0 100%; justify-content: flex-end; }
}
