:root {
  color-scheme: dark;
  --bg: #0f0f0f;
  --bg-deep: #1f1b17;
  --surface: rgba(246, 239, 228, 0.88);
  --surface-strong: rgba(250, 245, 237, 0.96);
  --surface-soft: rgba(240, 230, 213, 0.74);
  --surface-accent: linear-gradient(150deg, rgba(247, 240, 229, 0.98), rgba(233, 215, 182, 0.94));
  --line: rgba(200, 169, 106, 0.16);
  --line-strong: rgba(245, 230, 200, 0.28);
  --text: #32291f;
  --text-soft: rgba(72, 60, 43, 0.72);
  --text-on-dark: #f5e6c8;
  --accent: #c8a96a;
  --accent-strong: #a98241;
  --accent-soft: rgba(200, 169, 106, 0.16);
  --success: #c8a96a;
  --danger: #b68e67;
  --shadow-lg: 0 34px 86px rgba(6, 6, 6, 0.46);
  --shadow-md: 0 20px 48px rgba(6, 6, 6, 0.38);
  --shadow-sm: 0 12px 26px rgba(6, 6, 6, 0.3);
  --radius-xxl: 40px;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --container: 1240px;
  --container-width: 1200px;
  --container-padding: 24px;
  --header-text: rgba(66, 54, 39, 0.78);
  --header-text-strong: #32291f;
  --header-muted: rgba(88, 73, 54, 0.62);
  --header-accent: #c8a96a;
  --header-border: rgba(200, 169, 106, 0.18);
  --header-border-strong: rgba(245, 230, 200, 0.26);
  --header-shadow: 0 18px 42px rgba(5, 5, 5, 0.34);
  --header-shadow-strong: 0 18px 40px rgba(5, 5, 5, 0.4);
  --header-radius: 18px;
  --pill-bg:
    linear-gradient(135deg, rgba(250, 246, 238, 0.94), rgba(239, 229, 212, 0.88)),
    linear-gradient(180deg, rgba(200, 169, 106, 0.12), rgba(200, 169, 106, 0.03));
  --pill-bg-hover:
    linear-gradient(135deg, rgba(252, 249, 244, 0.96), rgba(243, 234, 220, 0.9)),
    linear-gradient(180deg, rgba(245, 230, 200, 0.18), rgba(200, 169, 106, 0.05));
  --pill-bg-active:
    linear-gradient(135deg, rgba(246, 238, 224, 0.98), rgba(233, 214, 179, 0.94)),
    linear-gradient(180deg, rgba(200, 169, 106, 0.24), rgba(245, 230, 200, 0.08));
  --pill-border: rgba(200, 169, 106, 0.18);
  --pill-border-strong: rgba(200, 169, 106, 0.34);
  --pill-highlight: rgba(245, 230, 200, 0.12);
  --pill-shadow:
    inset 0 1px 0 rgba(255, 250, 244, 0.68),
    0 12px 24px rgba(18, 14, 10, 0.12);
  --pill-shadow-hover:
    inset 0 1px 0 rgba(255, 252, 247, 0.76),
    0 16px 30px rgba(18, 14, 10, 0.16);
  --font-body: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

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

html {
  font-size: 16px;
  scroll-padding-top: 108px;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% -8%, rgba(200, 169, 106, 0.12), transparent 30%),
    radial-gradient(circle at 14% 12%, rgba(245, 230, 200, 0.06), transparent 24%),
    radial-gradient(circle at 88% 16%, rgba(200, 169, 106, 0.08), transparent 24%),
    repeating-linear-gradient(45deg, rgba(245, 230, 200, 0.016) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(-45deg, rgba(200, 169, 106, 0.028) 0 1px, transparent 1px 14px),
    linear-gradient(180deg, #26211c 0%, #171513 46%, #0f0f0f 100%);
  color: var(--text);
  font: 500 1rem/1.6 var(--font-body);
}

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

button {
  cursor: pointer;
}

code,
output {
  font: 600 0.92rem/1.2 "SFMono-Regular", "SF Mono", Consolas, monospace;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.page-shell {
  position: relative;
  padding: 118px 20px 44px;
  overflow: hidden;
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(28px);
}

.page-shell::before {
  top: 32px;
  left: -120px;
  width: 360px;
  height: 360px;
  background: rgba(200, 169, 106, 0.1);
}

.page-shell::after {
  right: -100px;
  bottom: 80px;
  width: 280px;
  height: 280px;
  background: rgba(245, 230, 200, 0.05);
}

.container,
.layout {
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.container {
  width: min(100% - (var(--container-padding) * 2), var(--container-width));
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  padding-top: 18px;
  transition: padding 0.24s ease;
}

.site-header.is-scrolled {
  padding-top: 12px;
}

.header-shell {
  position: relative;
}

.header-top {
  position: relative;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding: 14px 26px;
  border: 1px solid rgba(248, 242, 232, 0.34);
  border-radius: var(--header-radius);
  background:
    linear-gradient(
      135deg,
      rgba(250, 247, 241, 0.72) 0%,
      rgba(244, 236, 221, 0.56) 54%,
      rgba(234, 220, 192, 0.4) 100%
    );
  backdrop-filter: blur(30px) saturate(128%);
  -webkit-backdrop-filter: blur(30px) saturate(128%);
  box-shadow:
    0 22px 44px rgba(5, 5, 5, 0.22),
    inset 0 1px 0 rgba(250, 247, 241, 0.46),
    inset 0 -18px 34px rgba(200, 169, 106, 0.06);
  transition:
    background 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    transform 0.24s ease;
  overflow: hidden;
}

.header-top::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(250, 247, 241, 0.42),
      rgba(248, 242, 232, 0.16) 28%,
      transparent 52%
    ),
    linear-gradient(
      90deg,
      rgba(248, 242, 232, 0.16),
      transparent 42%,
      rgba(200, 169, 106, 0.12) 100%
    );
  pointer-events: none;
}

.header-top::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--header-radius) - 1px);
  border: 1px solid rgba(250, 247, 241, 0.2);
  pointer-events: none;
}

.site-header.is-scrolled .header-top {
  border-color: rgba(248, 242, 232, 0.4);
  background:
    linear-gradient(
      135deg,
      rgba(252, 249, 244, 0.78) 0%,
      rgba(246, 239, 226, 0.62) 54%,
      rgba(236, 223, 197, 0.44) 100%
    );
  box-shadow:
    0 24px 46px rgba(5, 5, 5, 0.24),
    inset 0 1px 0 rgba(252, 249, 244, 0.52),
    inset 0 -18px 34px rgba(200, 169, 106, 0.08);
  transform: translateY(-1px);
}

.header-top > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.brand:hover {
  transform: translateY(-1px);
  opacity: 0.94;
}

.brand img {
  display: block;
  width: 276px;
  max-width: min(58vw, 276px);
  height: auto;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--header-text-strong);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: var(--pill-shadow);
  transition:
    color 0.2s ease,
    opacity 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.nav-link::after {
  display: none;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--header-text-strong);
  border-color: var(--pill-border-strong);
  background: var(--pill-bg-active);
  box-shadow: var(--pill-shadow-hover);
  transform: translateY(-1px);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-social {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--header-text-strong);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--pill-shadow);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.social-link:hover {
  color: var(--header-text-strong);
  border-color: var(--pill-border-strong);
  background: var(--pill-bg-hover);
  box-shadow: var(--pill-shadow-hover);
  transform: translateY(-1px);
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--header-text-strong);
  box-shadow: var(--pill-shadow);
  backdrop-filter: blur(10px) saturate(112%);
  -webkit-backdrop-filter: blur(10px) saturate(112%);
}

.menu-btn:hover {
  border-color: var(--pill-border-strong);
  background: var(--pill-bg-hover);
  box-shadow: var(--pill-shadow-hover);
}

.hero h1,
.section-heading h2,
.guide-card strong {
  font-family: var(--font-display);
}

.layout {
  display: grid;
  gap: 24px;
  max-width: var(--container);
}

.development-banner {
  position: relative;
  z-index: 1;
  width: min(100%, var(--container));
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(245, 230, 200, 0.26);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(250, 246, 238, 0.92), rgba(235, 219, 190, 0.78)),
    radial-gradient(circle at 0% 50%, rgba(200, 169, 106, 0.2), transparent 34%);
  color: var(--text);
  box-shadow:
    0 18px 42px rgba(8, 7, 6, 0.22),
    inset 0 1px 0 rgba(255, 252, 247, 0.72);
  backdrop-filter: blur(18px) saturate(116%);
  -webkit-backdrop-filter: blur(18px) saturate(116%);
}

.development-banner::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 0 6px rgba(200, 169, 106, 0.18);
}

.development-banner-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(169, 130, 65, 0.2);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.56);
  color: rgba(82, 65, 45, 0.82);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.development-banner strong {
  font-weight: 850;
}

.development-banner span:not(.development-banner-badge) {
  color: var(--text-soft);
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(214, 191, 151, 0.46);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(249, 244, 236, 0.98), rgba(238, 228, 212, 0.96)),
    linear-gradient(135deg, rgba(200, 169, 106, 0.08), transparent 36%),
    linear-gradient(115deg, transparent 18%, rgba(255, 252, 247, 0.26) 28%, transparent 40%),
    linear-gradient(144deg, transparent 54%, rgba(200, 169, 106, 0.05) 68%, transparent 84%);
  box-shadow:
    0 28px 70px rgba(15, 11, 8, 0.18),
    inset 0 1px 0 rgba(255, 250, 243, 0.78);
  backdrop-filter: blur(18px);
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.card::before {
  background:
    linear-gradient(121deg, transparent 8%, rgba(200, 169, 106, 0.05) 18%, transparent 28%),
    linear-gradient(152deg, transparent 32%, rgba(255, 251, 245, 0.24) 46%, transparent 58%),
    linear-gradient(71deg, transparent 70%, rgba(245, 230, 200, 0.18) 82%, transparent 92%);
  opacity: 0.92;
}

.card::after {
  inset: 1px;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 250, 243, 0.52);
}

.card > * {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 28px;
  padding: 34px;
}

.hero-copy {
  display: grid;
  align-content: start;
}

.eyebrow,
.section-kicker,
.stat-label,
.preview-meta dt {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  color: var(--text);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.hero h1 {
  max-width: 13ch;
  font-size: clamp(2.8rem, 5vw, 5.1rem);
  font-weight: 700;
}

.hero-text {
  max-width: 60ch;
  margin: 20px 0 0;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-chips span {
  padding: 12px 16px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: var(--pill-shadow);
}

.hero-stats {
  display: grid;
  gap: 16px;
  align-content: start;
}

.stat-card {
  display: grid;
  gap: 8px;
  padding: 24px;
  border: 1px solid rgba(214, 191, 151, 0.4);
  border-radius: calc(var(--radius-xl) - 8px);
  background:
    linear-gradient(180deg, rgba(250, 246, 238, 0.98), rgba(240, 230, 215, 0.96)),
    rgba(244, 235, 220, 0.76);
  box-shadow: 0 18px 34px rgba(18, 14, 10, 0.1);
}

.stat-card-accent {
  border-color: rgba(200, 169, 106, 0.24);
  background:
    linear-gradient(145deg, rgba(246, 237, 219, 0.98), rgba(226, 204, 165, 0.95)),
    rgba(237, 221, 194, 0.8);
  color: var(--text);
}

.stat-card-accent .stat-label {
  color: rgba(82, 65, 45, 0.72);
}

.stat-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stat-value {
  display: inline-block;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition:
    color 0.24s ease,
    transform 0.24s ease,
    text-shadow 0.24s ease;
}

.stat-value.is-counting {
  color: var(--accent-strong);
  text-shadow: 0 10px 24px rgba(169, 130, 65, 0.24);
  transform: translateY(-2px);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 24px;
  align-items: start;
}

.editor,
.preview,
.guide {
  padding: 28px;
}

.preview {
  position: sticky;
  top: 24px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(1.5rem, 2.2vw, 2.3rem);
  font-weight: 700;
}

.section-heading-wide {
  align-items: end;
}

.guide-copy {
  max-width: 40ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.98rem;
}

.reset-link {
  padding: 10px 16px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: var(--pill-shadow);
}

.mode-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
  box-shadow: var(--pill-shadow);
}

.mode-pill:hover {
  transform: translateY(-1px);
  background: var(--pill-bg-hover);
  box-shadow: var(--pill-shadow-hover);
}

.mode-pill.is-active {
  border-color: var(--pill-border-strong);
  background: var(--pill-bg-active);
  color: var(--text);
}

.smart-input-panel,
.manual-format-panel,
.clarify-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(214, 191, 151, 0.36);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(251, 247, 240, 0.98), rgba(240, 231, 216, 0.96)),
    linear-gradient(135deg, rgba(200, 169, 106, 0.05), transparent 36%);
  box-shadow:
    0 16px 34px rgba(16, 12, 9, 0.1),
    inset 0 1px 0 rgba(255, 251, 245, 0.76);
}

.smart-input-panel::before,
.manual-format-panel::before,
.clarify-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 8%, rgba(200, 169, 106, 0.04) 19%, transparent 28%),
    linear-gradient(152deg, transparent 36%, rgba(255, 252, 247, 0.24) 48%, transparent 60%);
  pointer-events: none;
}

.smart-input-panel,
.manual-format-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  margin-bottom: 18px;
}

.smart-input-panel textarea {
  min-height: 112px;
}

.smart-input-help {
  position: relative;
  z-index: 1;
}

.manual-format-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.manual-format-header h3 {
  margin: 6px 0 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.reset-link-soft {
  padding-inline: 14px;
  font-size: 0.9rem;
}

.format-switcher {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.format-switcher.is-highlighted {
  padding: 12px;
  margin: -12px;
  border-radius: 22px;
  background: rgba(255, 251, 244, 0.76);
  box-shadow: 0 0 0 2px rgba(200, 169, 106, 0.18);
}

.format-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  font-synthesis: none;
  box-shadow: var(--pill-shadow);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.format-pill:hover {
  transform: translateY(-1px);
  background: var(--pill-bg-hover);
  box-shadow: var(--pill-shadow-hover);
}

.format-pill.is-active {
  border-color: var(--pill-border-strong);
  background: var(--pill-bg-active);
  box-shadow: var(--pill-shadow-hover);
}

.validation-banner {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 600;
}

.validation-banner.is-info {
  border-color: rgba(200, 169, 106, 0.16);
  background: rgba(247, 242, 234, 0.92);
  color: var(--text);
}

.validation-banner.is-success {
  border-color: rgba(200, 169, 106, 0.18);
  background: rgba(242, 236, 225, 0.94);
  color: var(--text);
}

.validation-banner.is-error {
  border-color: rgba(182, 142, 103, 0.22);
  background: rgba(245, 234, 225, 0.94);
  color: #835837;
}

.field-stack {
  display: grid;
  gap: 16px;
}

.input-panel,
.field-compact,
.toggle-field,
.preview-meta div,
.guide-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(214, 191, 151, 0.36);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(251, 247, 240, 0.98), rgba(240, 231, 216, 0.96)),
    linear-gradient(135deg, rgba(200, 169, 106, 0.05), transparent 36%);
  box-shadow:
    0 16px 34px rgba(16, 12, 9, 0.1),
    inset 0 1px 0 rgba(255, 251, 245, 0.76);
}

.input-panel::before,
.field-compact::before,
.toggle-field::before,
.preview-meta div::before,
.guide-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 8%, rgba(200, 169, 106, 0.04) 19%, transparent 28%),
    linear-gradient(152deg, transparent 36%, rgba(255, 252, 247, 0.24) 48%, transparent 60%);
  pointer-events: none;
}

.input-panel,
.field-compact {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.toggle-field strong {
  position: relative;
  z-index: 1;
  font-size: 0.92rem;
  font-weight: 700;
}

.field :is(
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="number"],
    input[type="datetime-local"],
    textarea,
    select
  ),
.field-full :is(
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="number"],
    input[type="datetime-local"]
  ) {
  width: 100%;
  border: 1px solid rgba(214, 191, 151, 0.34);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(244, 236, 224, 0.96)),
    rgba(245, 239, 230, 0.78);
  color: var(--text);
  padding: 15px 18px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  resize: vertical;
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.72);
}

.field :is(input, textarea)::placeholder {
  color: rgba(110, 90, 64, 0.46);
}

.field textarea {
  min-height: 120px;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.preset-button:focus-visible,
.mode-pill:focus-visible,
.format-pill:focus-visible,
.background-pill:focus-visible,
.texture-swatch:focus-visible,
.upload-trigger:focus-within,
.button:focus-visible,
.reset-link:focus-visible,
.clarify-option:focus-visible,
.clarify-manual:focus-visible,
.clarify-close:focus-visible,
.toggle-field:has(input:focus-visible) {
  outline: none;
  border-color: rgba(200, 169, 106, 0.34);
  box-shadow:
    0 0 0 4px rgba(200, 169, 106, 0.14),
    inset 0 1px 0 rgba(255, 252, 247, 0.72);
}

.field-help,
.preview-hint,
.notice {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.toggle-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
}

.toggle-field input {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.toggle-field span {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
}

.toggle-field small {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.clarify-dialog[hidden] {
  display: none;
}

.clarify-dialog {
  position: relative;
  z-index: 4;
  margin-bottom: 18px;
}

.clarify-backdrop {
  display: none;
}

.clarify-card {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  display: grid;
  gap: 14px;
  padding: 26px;
  margin: 0;
  box-shadow:
    0 24px 46px rgba(15, 11, 8, 0.16),
    inset 0 1px 0 rgba(255, 251, 245, 0.78);
}

.clarify-card h3 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.15;
}

.clarify-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.98rem;
}

.clarify-options {
  display: grid;
  gap: 10px;
}

.clarify-option,
.clarify-manual,
.clarify-close {
  position: relative;
  z-index: 1;
}

.clarify-option,
.clarify-manual {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(214, 191, 151, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(244, 236, 224, 0.96)),
    rgba(245, 239, 230, 0.78);
  color: var(--text);
  text-align: left;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.72);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.clarify-option:hover,
.clarify-manual:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 169, 106, 0.32);
  box-shadow:
    0 14px 26px rgba(34, 23, 15, 0.08),
    inset 0 1px 0 rgba(255, 252, 247, 0.76);
}

.clarify-manual {
  justify-self: start;
}

.clarify-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214, 191, 151, 0.34);
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.92);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(22, 16, 11, 0.08);
}

.field-full {
  grid-column: 1 / -1;
}

.marker-panel-stack {
  display: grid;
  gap: 16px;
}

.marker-corner-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: var(--pill-shadow);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.preset-button:hover {
  transform: translateY(-1px);
  background: var(--pill-bg-hover);
  box-shadow: var(--pill-shadow-hover);
}

.preset-button.is-active {
  border-color: var(--pill-border-strong);
  background: var(--pill-bg-active);
  box-shadow: var(--pill-shadow-hover);
}

.background-section {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid rgba(214, 191, 151, 0.36);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(250, 246, 239, 0.98), rgba(240, 230, 216, 0.96)),
    linear-gradient(135deg, rgba(200, 169, 106, 0.05), transparent 36%);
  box-shadow:
    0 18px 34px rgba(16, 12, 9, 0.1),
    inset 0 1px 0 rgba(255, 251, 245, 0.78);
}

.pro-section {
  margin-top: 24px;
}

.background-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.background-heading h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.background-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.background-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
  box-shadow: var(--pill-shadow);
}

.background-pill:hover {
  transform: translateY(-1px);
  background: var(--pill-bg-hover);
  box-shadow: var(--pill-shadow-hover);
}

.background-pill.is-active {
  border-color: var(--pill-border-strong);
  background: var(--pill-bg-active);
  color: var(--text);
}

.background-panel-stack,
.background-image-controls {
  display: grid;
  gap: 16px;
}

.background-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(214, 191, 151, 0.32);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(242, 234, 221, 0.96)),
    rgba(245, 239, 230, 0.76);
  box-shadow:
    0 12px 24px rgba(18, 14, 10, 0.08),
    inset 0 1px 0 rgba(255, 252, 247, 0.72);
}

.background-panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.texture-active-label {
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
}

.texture-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.texture-swatch {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 116px;
  padding: 10px;
  border: 1px solid rgba(140, 110, 70, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(234, 221, 200, 0.2), rgba(220, 197, 164, 0.15)),
    rgba(225, 203, 173, 0.18);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow:
    0 12px 24px rgba(96, 74, 45, 0.08),
    inset 0 1px 0 rgba(238, 224, 203, 0.44);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.texture-swatch::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(46, 30, 19, 0.68) 100%);
}

.texture-swatch span {
  position: relative;
  z-index: 1;
  color: #ecd7b6;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
  text-shadow: 0 1px 8px rgba(18, 11, 7, 0.34);
}

.texture-swatch:hover {
  transform: translateY(-1px);
}

.texture-swatch.is-active {
  border-color: rgba(205, 161, 95, 0.56);
  box-shadow:
    0 18px 30px rgba(96, 74, 45, 0.12),
    0 0 0 3px rgba(205, 161, 95, 0.18),
    inset 0 1px 0 rgba(241, 228, 208, 0.5);
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.upload-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px dashed rgba(168, 126, 83, 0.3);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 800;
  box-shadow: var(--pill-shadow);
}

.upload-trigger input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-meta {
  display: grid;
  gap: 4px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.upload-meta strong {
  color: var(--text);
  font-size: 0.96rem;
}

.pro-controls-grid {
  margin-top: 4px;
}

.button-small {
  min-height: 52px;
  padding-inline: 16px;
  font-size: 0.92rem;
}

.range-field,
.color-field {
  display: grid;
  gap: 10px;
}

.range-field output,
.color-field code {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.color-field {
  grid-template-columns: auto 1fr;
  align-items: center;
}

input[type="color"] {
  width: 52px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 0.96rem;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button-primary {
  border-color: var(--pill-border-strong);
  background: var(--pill-bg-active);
  color: var(--text);
  box-shadow: var(--pill-shadow-hover);
}

.button-secondary {
  border-color: var(--pill-border);
  background: var(--pill-bg);
  color: var(--text);
  box-shadow: var(--pill-shadow);
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(200, 169, 106, 0.16);
  border-radius: 16px;
  background: rgba(248, 243, 235, 0.92);
}

.quality-panel {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(200, 169, 106, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(251, 247, 240, 0.98), rgba(242, 234, 220, 0.95)),
    rgba(248, 243, 235, 0.92);
}

.quality-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(200, 169, 106, 0.22);
  background: rgba(245, 238, 227, 0.96);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
}

.quality-badge.is-good {
  border-color: rgba(170, 147, 96, 0.28);
  background: rgba(243, 238, 230, 0.96);
}

.quality-badge.is-warn {
  border-color: rgba(186, 145, 85, 0.28);
  background: rgba(248, 240, 228, 0.96);
  color: #7a5732;
}

.quality-badge.is-danger {
  border-color: rgba(182, 142, 103, 0.28);
  background: rgba(246, 236, 228, 0.98);
  color: #835837;
}

.quality-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.status-badge.is-ready {
  background: var(--pill-bg-hover);
  color: var(--text);
}

.status-badge.is-error {
  background:
    linear-gradient(135deg, rgba(246, 236, 228, 0.98), rgba(236, 220, 206, 0.96)),
    rgba(245, 236, 227, 0.92);
  color: #835837;
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 460px;
  padding: 24px;
  border: 1px solid rgba(214, 191, 151, 0.42);
  border-radius: 30px;
  background: transparent;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 245, 0.34);
}

.preview-stage::before,
.preview-stage::after {
  display: none;
}

.preview-plaque {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 340px;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.preview-plaque::before,
.preview-plaque::after {
  display: none;
}

.plaque-pin,
.plaque-corner {
  display: none;
}

.plaque-pin {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #ead7b6, #b6915d 70%, #8d6d42 100%);
  box-shadow: 0 4px 10px rgba(77, 57, 34, 0.2);
}

.plaque-pin-top-left {
  top: 76px;
  left: 30px;
}

.plaque-pin-top-right {
  top: 76px;
  right: 30px;
}

.plaque-pin-bottom-left {
  bottom: 76px;
  left: 30px;
}

.plaque-pin-bottom-right {
  bottom: 76px;
  right: 30px;
}

.plaque-corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(145, 111, 69, 0.6);
  border-style: solid;
}

.plaque-corner-top-left {
  top: 38px;
  left: 38px;
  border-width: 2px 0 0 2px;
  border-top-left-radius: 10px;
}

.plaque-corner-top-right {
  top: 38px;
  right: 38px;
  border-width: 2px 2px 0 0;
  border-top-right-radius: 10px;
}

.plaque-corner-bottom-left {
  bottom: 38px;
  left: 38px;
  border-width: 0 0 2px 2px;
  border-bottom-left-radius: 10px;
}

.plaque-corner-bottom-right {
  right: 38px;
  bottom: 38px;
  border-width: 0 2px 2px 0;
  border-bottom-right-radius: 10px;
}

.preview-canvas,
.empty-state {
  position: relative;
  z-index: 1;
}

.preview-canvas {
  display: none;
  width: auto;
  height: auto;
  max-width: min(100%, var(--preview-width, 320px));
  max-height: min(100%, var(--preview-height, 320px));
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.preview-stage.has-code .preview-plaque {
  min-height: auto;
}

.preview-stage.has-code .preview-canvas {
  display: block;
}

.preview-stage.has-code .empty-state {
  display: none;
}

.empty-state {
  display: grid;
  gap: 6px;
  text-align: center;
  color: var(--text-soft);
}

.empty-state strong {
  color: var(--text);
  font-size: 1.05rem;
}

.preview-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.preview-meta div {
  padding: 16px 18px;
}

.preview-meta dt {
  margin: 0 0 4px;
  font-size: 0.76rem;
}

.preview-meta dd {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.preview-meta-full {
  grid-column: 1 / -1;
}

.preview-meta-full dd {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.preview-hint {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(200, 169, 106, 0.16);
  border-radius: 16px;
  background: rgba(248, 243, 235, 0.92);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  padding: 24px;
  text-align: center;
}

.guide-qr-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 250px);
  aspect-ratio: 0.68;
  padding: 28px 20px;
  border: 1px solid rgba(220, 201, 174, 0.5);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(236, 220, 196, 0.98), rgba(216, 194, 164, 0.96)),
    linear-gradient(128deg, transparent 12%, rgba(190, 157, 108, 0.12) 26%, transparent 36%),
    linear-gradient(154deg, transparent 54%, rgba(184, 150, 103, 0.12) 66%, transparent 78%);
  box-shadow:
    0 30px 56px rgba(89, 68, 40, 0.18),
    inset 0 2px 0 rgba(228, 210, 185, 0.48);
}

.guide-qr-shell::before,
.guide-qr-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.guide-qr-shell::before {
  inset: 20px;
  border: 1px solid rgba(150, 118, 77, 0.26);
  border-radius: 26px;
}

.guide-qr-shell::after {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 35% 35%, #ead7b6, #b6915d 70%, #8d6d42 100%);
  box-shadow:
    -92px -118px 0 0 #b99663,
    92px -118px 0 0 #b99663;
}

.guide-qr-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 178px;
  aspect-ratio: 1;
  padding: 18px;
  border: 1px solid rgba(150, 118, 77, 0.36);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(235, 220, 196, 0.96), rgba(219, 202, 178, 0.9)),
    rgba(224, 205, 180, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(228, 209, 184, 0.36),
    0 12px 22px rgba(78, 59, 35, 0.1);
}

.guide-qr-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(145, 111, 69, 0.3);
  border-radius: 18px;
}

.guide-qr-core {
  position: relative;
  z-index: 1;
  width: 76%;
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(86, 66, 39, 0.18));
}

.guide-card strong {
  color: var(--text);
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.guide-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  width: 100%;
}

.guide-list li {
  padding: 10px 12px;
  border: 1px solid rgba(200, 169, 106, 0.12);
  border-radius: 16px;
  background: rgba(249, 245, 238, 0.94);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.contact-band {
  padding: 30px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: var(--pill-shadow);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-link:hover {
  transform: translateY(-1px);
  border-color: var(--pill-border-strong);
  background: var(--pill-bg-hover);
  box-shadow: var(--pill-shadow-hover);
}

@media (max-width: 980px) {
  .header-top {
    justify-content: flex-start;
  }
}

@media (max-width: 840px) {
  .header-top {
    padding-inline: 20px;
  }
}

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

  .preview {
    position: static;
  }

  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .texture-preset-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .page-shell {
    padding-inline: 16px;
  }

  .section-heading,
  .section-heading-wide,
  .manual-format-header,
  .background-heading,
  .background-panel-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .editor,
  .preview,
  .guide,
  .contact-band {
    padding: 22px;
  }

  .development-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }

  .development-banner::before {
    position: absolute;
    top: 22px;
    right: 20px;
  }

  .hero h1 {
    max-width: none;
  }

  .controls-grid,
  .field-grid,
  .preview-meta {
    grid-template-columns: 1fr;
  }

  .marker-corner-grid {
    grid-template-columns: 1fr;
  }

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

  .texture-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 94px 14px 30px;
  }

  :root {
    --container-padding: 16px;
  }

  .site-header {
    padding-top: 14px;
  }

  .site-header.is-scrolled {
    padding-top: 10px;
  }

  .header-top {
    min-height: 64px;
    padding: 12px 16px;
    gap: 12px;
    border-radius: 16px;
  }

  .brand {
    padding: 0;
  }

  .brand img {
    width: min(64vw, 240px);
  }

  .hero h1 {
    font-size: clamp(2.3rem, 10vw, 3.5rem);
  }

  .mode-switcher,
  .format-switcher {
    gap: 8px;
  }

  .mode-pill,
  .format-pill,
  .background-pill,
  .preset-button {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .clarify-dialog {
    margin-bottom: 16px;
  }

  .clarify-card {
    width: 100%;
    padding: 22px 18px 18px;
    border-radius: 24px;
  }

  .clarify-manual {
    width: 100%;
    justify-self: stretch;
  }

  .texture-preset-grid {
    grid-template-columns: 1fr;
  }

  .upload-actions {
    flex-direction: column;
  }

  .contact-actions {
    flex-direction: column;
  }

  .contact-link {
    width: 100%;
  }

  .preview-stage {
    min-height: 360px;
    padding: 16px;
  }

  .preview-plaque {
    height: clamp(300px, 82vw, 360px);
    padding: 44px 24px;
  }

  .plaque-pin-top-left,
  .plaque-pin-top-right {
    top: 58px;
  }

  .plaque-pin-bottom-left,
  .plaque-pin-bottom-right {
    bottom: 58px;
  }

  .plaque-pin-top-left,
  .plaque-pin-bottom-left {
    left: 20px;
  }

  .plaque-pin-top-right,
  .plaque-pin-bottom-right {
    right: 20px;
  }

  .plaque-corner-top-left,
  .plaque-corner-top-right {
    top: 28px;
  }

  .plaque-corner-bottom-left,
  .plaque-corner-bottom-right {
    bottom: 28px;
  }

  .plaque-corner-top-left,
  .plaque-corner-bottom-left {
    left: 28px;
  }

  .plaque-corner-top-right,
  .plaque-corner-bottom-right {
    right: 28px;
  }

  .actions .button {
    flex: 1 1 100%;
  }

  .texture-swatch {
    min-height: 104px;
  }
}
