:root {
  --ink: #171711;
  --ink-soft: #3e3e35;
  --paper: #f4f1e8;
  --paper-deep: #e9e5da;
  --white: #fffef9;
  --acid: #dfff00;
  --acid-deep: #b7d000;
  --orange: #ff6a2a;
  --line: rgba(23, 23, 17, 0.14);
  --line-dark: rgba(23, 23, 17, 0.24);
  --muted: #77776c;
  --success: #2b6e45;
  --danger: #a6422c;
  --shadow: 0 22px 70px rgba(44, 42, 30, 0.15);
  --radius: 20px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
select,
input[type="color"],
input[type="range"] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(181, 209, 0, 0.45);
  outline-offset: 2px;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 13px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  background: rgba(23, 23, 17, 0.96);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: inherit;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-decoration: none;
}

.brand-mark {
  width: 31px;
  height: 31px;
  fill: currentColor;
}

.brand-mark .accent {
  fill: var(--acid);
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.privacy-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  height: 39px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.privacy-dot,
.instant-note i,
.live-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(223, 255, 0, 0.12);
}

.language-picker {
  position: relative;
  display: flex;
  align-items: center;
  height: 39px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.language-picker svg {
  position: absolute;
  left: 12px;
  width: 16px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 1.6;
  pointer-events: none;
}

.language-picker select {
  height: 100%;
  padding: 0 32px 0 34px;
  border: 0;
  border-radius: inherit;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  appearance: none;
}

.language-picker::after {
  position: absolute;
  right: 12px;
  content: "⌄";
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 60px;
  align-items: end;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(70px, 10vw, 140px) clamp(20px, 5vw, 76px) clamp(50px, 7vw, 92px);
  overflow: hidden;
}

.hero::after {
  position: absolute;
  top: -110px;
  right: 1.5%;
  width: 370px;
  height: 370px;
  border: 1px solid rgba(23, 23, 17, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 55px rgba(23, 23, 17, 0.025),
    0 0 0 110px rgba(23, 23, 17, 0.018);
  content: "";
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(48px, 6.4vw, 88px);
  font-weight: 940;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.hero-copy p {
  max-width: 660px;
  margin: 34px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 520;
  letter-spacing: -0.02em;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.stat {
  min-height: 125px;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.workbench {
  display: grid;
  grid-template-columns: 330px minmax(400px, 1fr) minmax(340px, 430px);
  max-width: 1640px;
  min-height: 760px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow);
}

.catalog-panel,
.editor-panel,
.preview-panel {
  min-width: 0;
}

.catalog-panel {
  display: flex;
  flex-direction: column;
  max-height: 900px;
  border-right: 1px solid rgba(255, 255, 255, 0.11);
  background: #1c1c16;
}

.panel-heading,
.selected-header,
.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.panel-heading {
  padding: 27px 24px 20px;
}

.step-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 22px;
  margin-bottom: 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}

.panel-heading h2,
.preview-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.search-box {
  position: relative;
  margin: 0 20px 14px;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.48);
  stroke-width: 1.8;
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: white;
  background: rgba(255, 255, 255, 0.055);
  font-size: 13px;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.search-box kbd {
  position: absolute;
  top: 50%;
  right: 10px;
  min-width: 22px;
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.14);
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
  transform: translateY(-50%);
}

.catalog-scroll {
  flex: 1;
  min-height: 0;
  padding: 0 10px 24px;
  overflow-y: auto;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  scrollbar-width: thin;
}

.category-block + .category-block {
  margin-top: 18px;
}

.category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 10px 6px;
  color: rgba(255, 255, 255, 0.34);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.category-title span:last-child {
  letter-spacing: 0;
}

.format-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  text-align: left;
}

.format-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.045);
}

.format-item.active {
  border-color: rgba(223, 255, 0, 0.42);
  color: white;
  background: rgba(223, 255, 0, 0.08);
}

.format-item.active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -1px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--acid);
  content: "";
}

.format-symbol {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  grid-auto-rows: 4px;
  gap: 2px;
  align-content: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}

.format-symbol i {
  width: 4px;
  height: 4px;
  background: currentColor;
}

.format-symbol i:nth-child(2),
.format-symbol i:nth-child(4),
.format-symbol i:nth-child(8) {
  opacity: 0.18;
}

.format-name {
  overflow: hidden;
  font-size: 11px;
  font-weight: 670;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.format-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 900;
}

.format-state.ready {
  color: var(--ink);
  background: var(--acid);
}

.catalog-empty {
  flex: 1;
  padding: 60px 30px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

.catalog-empty span {
  display: block;
  font-size: 44px;
  font-weight: 200;
}

.catalog-empty p {
  font-size: 12px;
}

.editor-panel {
  padding: 35px clamp(26px, 3vw, 50px);
  color: var(--ink);
  background: var(--white);
}

.selected-header {
  gap: 20px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.selected-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.selected-meta .step-label {
  margin: 0;
  color: var(--ink);
}

.selected-header h2 {
  margin: 0;
  font-size: clamp(27px, 2.7vw, 40px);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.status-pill {
  display: inline-flex;
  flex: none;
  gap: 6px;
  align-items: center;
  min-height: 29px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill.ready {
  color: #274d21;
  background: #eaf6d4;
}

.status-icon {
  font-family: var(--mono);
  font-size: 11px;
}

.input-section {
  padding: 28px 0 22px;
}

.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.section-label-row label {
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.02em;
}

.section-label-row > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.textarea-wrap {
  position: relative;
}

.textarea-wrap textarea {
  display: block;
  width: 100%;
  min-height: 166px;
  padding: 17px 58px 17px 17px;
  border: 1px solid var(--line-dark);
  border-radius: 11px;
  color: var(--ink);
  background: #fbfaf5;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.textarea-wrap textarea:focus {
  border-color: var(--acid-deep);
  box-shadow: 0 0 0 4px rgba(223, 255, 0, 0.15);
  outline: none;
}

.text-action {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 7px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: var(--paper-deep);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.input-footer {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
}

.examples {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.examples button {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  text-transform: none;
}

.examples button:hover {
  border-color: var(--ink);
}

.instant-note {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--success);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.instant-note i {
  width: 5px;
  height: 5px;
  background: #72a948;
  box-shadow: none;
}

.settings {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 55px;
  font-size: 11px;
  font-weight: 820;
  list-style: none;
}

.settings summary::-webkit-details-marker {
  display: none;
}

.settings summary > span {
  display: flex;
  gap: 9px;
  align-items: center;
}

.settings summary svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.settings summary .chevron {
  width: 16px;
  transition: transform 180ms ease;
}

.settings[open] summary .chevron {
  transform: rotate(180deg);
}

.settings-body {
  display: grid;
  gap: 22px;
  padding: 8px 0 26px;
}

.setting-row {
  display: grid;
  gap: 11px;
}

.setting-row > label,
.color-setting > span:first-child,
.select-setting > span:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
}

.setting-row output {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.setting-row select,
.select-setting select {
  width: 100%;
  height: 39px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f4;
  font-size: 11px;
  font-weight: 700;
}

.macro-settings {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr 0.9fr;
  gap: 10px;
}

.macro-settings label {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
}

.macro-settings input {
  width: 100%;
  height: 39px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f4;
  font-size: 11px;
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: var(--paper-deep);
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  appearance: none;
}

input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--acid);
}

.setting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.color-setting,
.select-setting {
  display: grid;
  gap: 9px;
}

.color-control {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f4;
}

.color-control input {
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
}

.color-control input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-control input::-webkit-color-swatch {
  border: 1px solid var(--line);
  border-radius: 5px;
}

.color-control code {
  margin-left: 8px;
  color: var(--muted);
  font-size: 9px;
}

.reset-button {
  display: flex;
  gap: 8px;
  align-items: center;
  align-self: end;
  justify-content: center;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
}

.reset-button:hover {
  color: var(--ink);
  border-color: var(--line-dark);
}

.reset-button svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.preview-panel {
  padding: 28px clamp(22px, 2.4vw, 36px);
  border-left: 1px solid rgba(255, 255, 255, 0.11);
  background: #202019;
}

.preview-header {
  align-items: center;
  margin-bottom: 25px;
}

.preview-header .step-label {
  margin-bottom: 6px;
}

.live-badge {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.live-badge i {
  width: 5px;
  height: 5px;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  50% { opacity: 0.35; box-shadow: 0 0 0 7px rgba(223, 255, 0, 0); }
}

.canvas-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 390px;
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 3px;
  background-color: #e7e4da;
  background-image:
    linear-gradient(45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.025) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.025) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  overflow: hidden;
}

.canvas-stage::before {
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(23, 23, 17, 0.16);
  content: "";
  pointer-events: none;
}

.canvas-stage canvas {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  image-rendering: pixelated;
  box-shadow: 0 10px 28px rgba(23, 23, 17, 0.18);
}

.corner {
  position: absolute;
  z-index: 2;
  width: 15px;
  height: 15px;
  border-color: rgba(23, 23, 17, 0.56);
  pointer-events: none;
}

.corner.top-left { top: 17px; left: 17px; border-top: 2px solid; border-left: 2px solid; }
.corner.top-right { top: 17px; right: 17px; border-top: 2px solid; border-right: 2px solid; }
.corner.bottom-left { bottom: 17px; left: 17px; border-bottom: 2px solid; border-left: 2px solid; }
.corner.bottom-right { right: 17px; bottom: 17px; border-right: 2px solid; border-bottom: 2px solid; }

.empty-preview {
  position: absolute;
  z-index: 3;
  inset: 19px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: var(--ink);
  background: rgba(231, 228, 218, 0.95);
  text-align: center;
}

.empty-mark {
  display: grid;
  grid-template-columns: repeat(2, 20px);
  grid-template-rows: repeat(2, 20px);
  gap: 6px;
  margin-bottom: 18px;
  transform: rotate(8deg);
}

.empty-mark span {
  border: 5px solid var(--ink);
}

.empty-mark span:last-child {
  border-color: var(--orange);
  background: var(--orange);
}

.empty-preview strong {
  margin-bottom: 6px;
  font-size: 15px;
}

.empty-preview p {
  max-width: 280px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.render-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.render-meta div {
  min-width: 0;
  padding: 0 9px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.render-meta div:first-child {
  padding-left: 0;
}

.render-meta div:last-child {
  padding-right: 0;
  border-right: 0;
}

.render-meta span,
.render-meta strong {
  display: block;
}

.render-meta span {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.render-meta strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 9px;
}

.primary-button,
.secondary-button {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.primary-button {
  border: 1px solid var(--acid);
  color: var(--ink);
  background: var(--acid);
}

.primary-button:hover:not(:disabled) {
  background: #edff69;
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  background: transparent;
}

.secondary-button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.45);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.primary-button svg,
.secondary-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.export-hint {
  margin: 11px 0 0;
  color: rgba(255, 255, 255, 0.32);
  font-size: 9px;
  text-align: center;
}

.format-mobile-button,
.mobile-catalog-close,
.scrim {
  display: none;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1320px;
  margin: 80px auto;
  padding: 0 30px;
}

.trust-strip > div {
  position: relative;
  min-height: 130px;
  padding: 8px 40px;
  border-right: 1px solid var(--line-dark);
}

.trust-strip > div:first-child {
  padding-left: 0;
}

.trust-strip > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.trust-index {
  display: block;
  margin-bottom: 17px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.trust-strip h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.trust-strip p {
  max-width: 290px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  align-items: center;
  min-height: 110px;
  padding: 28px clamp(20px, 5vw, 76px);
  color: rgba(255, 255, 255, 0.68);
  background: var(--ink);
}

.footer-brand {
  color: white;
}

footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
  text-align: center;
}

footer button {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  font-size: 10px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: currentColor;
  background: transparent;
}

.icon-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

dialog {
  width: min(560px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 24px 100px rgba(0, 0, 0, 0.4);
}

dialog::backdrop {
  background: rgba(23, 23, 17, 0.7);
  backdrop-filter: blur(3px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 25px;
  color: white;
  background: var(--ink);
}

.dialog-header h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.dialog-body {
  padding: 26px;
}

.dialog-body > p {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 13px;
}

.about-grid {
  display: grid;
  gap: 1px;
  margin-bottom: 22px;
  background: var(--line);
}

.about-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px;
  background: var(--paper);
}

.about-grid span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.about-grid strong {
  font-family: var(--mono);
  font-size: 10px;
}

.license-note {
  margin-bottom: 0 !important;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 10px !important;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(360px, calc(100% - 48px));
  padding: 12px 17px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 9px;
  color: white;
  background: var(--ink);
  box-shadow: 0 13px 40px rgba(0, 0, 0, 0.25);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 170ms ease, transform 170ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1250px) {
  .workbench {
    grid-template-columns: 292px minmax(360px, 1fr) minmax(320px, 375px);
  }

  .editor-panel {
    padding-right: 28px;
    padding-left: 28px;
  }

  .canvas-stage {
    min-height: 340px;
    padding: 32px;
  }

  .canvas-stage canvas {
    max-height: 270px;
  }
}

@media (max-width: 1050px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    max-width: 660px;
  }

  .workbench {
    position: relative;
    grid-template-columns: minmax(420px, 1fr) minmax(330px, 0.82fr);
  }

  .catalog-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: min(360px, calc(100% - 48px));
    max-height: none;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.35);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  body.catalog-open {
    overflow: hidden;
  }

  body.catalog-open .catalog-panel {
    transform: translateX(0);
  }

  .scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    visibility: hidden;
    background: rgba(23, 23, 17, 0.68);
    opacity: 0;
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  body.catalog-open .scrim {
    visibility: visible;
    opacity: 1;
  }

  .mobile-catalog-close {
    display: inline-flex;
    color: rgba(255, 255, 255, 0.55);
  }

  .format-mobile-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 25px;
    padding: 12px 14px;
    border: 1px solid var(--line-dark);
    border-radius: 10px;
    background: var(--paper);
    text-align: left;
  }

  .format-mobile-button span {
    display: grid;
    gap: 2px;
  }

  .format-mobile-button small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .format-mobile-button strong {
    font-size: 12px;
  }

  .format-mobile-button svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 62px;
  }

  .privacy-chip {
    display: none;
  }

  .language-picker select {
    width: 44px;
    padding: 0;
    color: transparent;
  }

  .language-picker::after {
    display: none;
  }

  .hero {
    gap: 40px;
    padding-top: 70px;
    padding-bottom: 55px;
  }

  .hero h1 {
    font-size: clamp(45px, 14vw, 70px);
  }

  .hero-copy p {
    margin-top: 26px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .stat {
    min-height: 100px;
  }

  .workbench {
    display: block;
  }

  .editor-panel,
  .preview-panel {
    padding: 28px 20px;
  }

  .preview-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    border-left: 0;
  }

  .canvas-stage {
    min-height: 360px;
  }

  .canvas-stage canvas {
    max-height: 285px;
  }

  .trust-strip {
    grid-template-columns: 1fr;
    margin: 50px auto;
  }

  .trust-strip > div,
  .trust-strip > div:first-child,
  .trust-strip > div:last-child {
    min-height: auto;
    padding: 24px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .trust-strip > div:last-child {
    border-bottom: 0;
  }

  footer {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 16px;
  }

  footer p {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 12px;
  }

  .brand-mark {
    width: 27px;
    height: 27px;
  }

  .hero h1 {
    letter-spacing: -0.08em;
  }

  .selected-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .selected-header h2 {
    font-size: 30px;
  }

  .input-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 9px;
  }

  .setting-grid {
    grid-template-columns: 1fr;
  }

  .macro-settings {
    grid-template-columns: 1fr;
  }

  .canvas-stage {
    min-height: 315px;
    padding: 28px;
  }

  .canvas-stage canvas {
    max-height: 240px;
  }
}

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