:root {
  color-scheme: light;
  --page: #f3f5f0;
  --surface: #fbfcf8;
  --surface-strong: #ffffff;
  --ink: #151a12;
  --ink-soft: #5f6859;
  --muted: #7b8375;
  --line: rgba(36, 48, 30, 0.12);
  --line-strong: rgba(36, 48, 30, 0.2);
  --olive: #4e642b;
  --olive-dark: #253315;
  --gold: #c8a846;
  --gold-soft: rgba(200, 168, 70, 0.18);
  --mint: #8fc8b4;
  --shadow-soft: 0 18px 55px rgba(33, 43, 24, 0.1);
  --shadow-deep: 0 30px 90px rgba(22, 31, 17, 0.18);
  --shadow-float: 0 24px 70px rgba(22, 31, 17, 0.16);
  --glass: rgba(255, 255, 255, 0.72);
  --radius: 8px;
  --panel-border: rgba(255, 255, 255, 0.82);
  --control-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 249, 243, 0.86));
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(27, 39, 21, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 39, 21, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 48% -8%, rgba(255, 255, 255, 0.88), transparent 28%),
    radial-gradient(circle at 12% 12%, rgba(143, 200, 180, 0.24), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(200, 168, 70, 0.18), transparent 26%),
    linear-gradient(135deg, #f7f8f3 0%, #eef2ec 100%);
  background-size: 36px 36px, 36px 36px, auto, auto, auto, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(21, 26, 18, 0.07), transparent 18%, transparent 82%, rgba(21, 26, 18, 0.05)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.75), transparent 42%);
  mix-blend-mode: multiply;
}

body::after {
  content: "";
  position: fixed;
  inset: auto 8% 0 auto;
  width: 520px;
  height: 520px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(200, 168, 70, 0.14), transparent 62%);
  filter: blur(18px);
  opacity: 0.8;
}

::selection {
  background: rgba(200, 168, 70, 0.28);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button,
summary,
.picker-button,
.style-chip,
.template-chip,
.font-chip,
.color-field,
.field-block input,
.field-block select,
.logo-stage,
.preview-panel,
.control-section,
.hint-panel {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(200, 168, 70, 0.34);
  outline-offset: 3px;
}

.app-shell {
  width: min(1500px, calc(100% - 44px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 36px 0 54px;
  position: relative;
  z-index: 1;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(390px, 0.82fr);
  gap: 22px;
  align-items: start;
}

.copy-block {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 28px;
  align-items: end;
  padding: 8px 2px 18px;
  border-bottom: 1px solid rgba(36, 48, 30, 0.08);
}

.eyebrow {
  margin: 0 0 12px;
  width: fit-content;
  border: 1px solid rgba(78, 100, 43, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--olive);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

h1 {
  margin: 0;
  max-width: 900px;
  font-family: "Playfair Display", Inter, serif;
  font-size: clamp(46px, 5.2vw, 84px);
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 10px 30px rgba(31, 42, 24, 0.08);
  background: linear-gradient(105deg, #11170f 0%, #253315 46%, #6b742d 72%, #151a12 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.01em;
  overflow: hidden;
}

.hero-title::after {
  content: "";
  position: absolute;
  inset: -18% -12%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 16%, rgba(255, 255, 255, 0.72) 42%, rgba(200, 168, 70, 0.62) 50%, transparent 68%);
  transform: translateX(-120%) skewX(-16deg);
  mix-blend-mode: screen;
  animation: titleSweep 4.2s ease-in-out 1.4s infinite;
}

.hero-title-char {
  display: inline-block;
  color: transparent;
  background: linear-gradient(120deg, #10170f 0%, #31451e 44%, #a88b2f 68%, #151a12 100%);
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0;
  transform: translateY(24px) scale(0.92);
  filter: blur(7px);
  animation:
    titleCharIn 0.72s cubic-bezier(.2, .86, .18, 1) forwards,
    titleCharFloat 2.8s ease-in-out infinite;
  animation-delay: calc(var(--char-index) * 0.045s), calc(1.1s + var(--char-index) * 0.045s);
  text-shadow: 0 12px 26px rgba(31, 42, 24, 0.16);
}

.hero-title-char:nth-child(3n) {
  animation-duration: 0.72s, 3.15s;
}

.hero-title-char:nth-child(4n) {
  animation-duration: 0.72s, 2.55s;
}

.intro {
  margin: 0;
  max-width: 520px;
  justify-self: end;
  border-left: 2px solid rgba(200, 168, 70, 0.48);
  color: var(--ink-soft);
  line-height: 1.82;
  font-size: 15px;
  padding: 4px 0 4px 16px;
  text-wrap: pretty;
}

.demo-column {
  display: grid;
  gap: 14px;
  align-content: start;
}

.preview-panel {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.85), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(241, 244, 236, 0.78)),
    linear-gradient(90deg, rgba(37, 51, 21, 0.08), transparent 34%, rgba(200, 168, 70, 0.09));
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  padding: 36px 24px 24px;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.preview-panel::before {
  content: "Preview";
  position: absolute;
  top: 12px;
  left: 22px;
  z-index: 2;
  color: rgba(37, 51, 21, 0.5);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.preview-panel .logo-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.preview-panel::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(37, 51, 21, 0.06);
  border-radius: 9px;
  pointer-events: none;
}

.logo-stage {
  width: 100%;
  aspect-ratio: 3.05 / 1;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(31, 42, 24, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -18px 40px rgba(36, 48, 30, 0.035),
    0 16px 42px rgba(31, 42, 24, 0.14);
  position: relative;
  z-index: 1;
}

.logo-stage[data-mode="transparent"] {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, rgba(37, 51, 21, 0.07) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(37, 51, 21, 0.07) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(37, 51, 21, 0.07) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(37, 51, 21, 0.07) 75%);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.logo-stage svg {
  display: block;
  width: 100%;
  height: 100%;
}

.generator-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--control-bg);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  padding: 20px;
  backdrop-filter: blur(18px);
  position: sticky;
  top: 22px;
}

.generator-form::before {
  content: "Controls";
  display: block;
  width: fit-content;
  border-radius: 999px;
  background: rgba(78, 100, 43, 0.08);
  color: var(--olive);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 7px 10px;
}

.control-section {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(36, 48, 30, 0.09);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(246, 248, 241, 0.62));
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.control-section h2 {
  margin: 0;
  color: var(--olive-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-section h2::before {
  content: "";
  width: 6px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--olive));
}

.input-grid,
.picker-row,
.color-grid,
.canvas-grid,
.custom-size-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.custom-size-grid {
  display: none;
}

.canvas-grid.custom .custom-size-grid {
  display: grid;
}

.field-block {
  display: grid;
  gap: 7px;
}

.field-block span,
.size-control label,
.hint-panel span {
  color: var(--olive-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.field-block input,
.field-block select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 8px 18px rgba(31, 42, 24, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.field-block select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--olive-dark) 50%),
    linear-gradient(135deg, var(--olive-dark) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

#markText {
  text-transform: uppercase;
}

.field-block input:focus,
.field-block select:focus {
  border-color: rgba(78, 100, 43, 0.55);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(78, 100, 43, 0.12), 0 12px 24px rgba(31, 42, 24, 0.08);
  transform: translateY(-1px);
}

.color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 243, 0.82));
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.color-field span {
  color: var(--olive-dark);
  font-size: 12px;
  font-weight: 900;
}

.color-field input {
  width: 58px;
  height: 36px;
  border: 1px solid rgba(31, 42, 24, 0.12);
  border-radius: 7px;
  background: transparent;
  padding: 2px;
  cursor: pointer;
}

.picker-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.9), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 244, 236, 0.92));
  color: var(--ink);
  padding: 12px 14px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 22px rgba(31, 42, 24, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.picker-button:hover,
.style-chip:hover,
.template-chip:hover,
.font-chip:hover,
#downloadBtn:hover,
.generate-button:hover,
.modal-close:hover {
  transform: translateY(-1px);
}

.picker-button:active,
.style-chip:active,
.template-chip:active,
.font-chip:active,
#downloadBtn:active,
.generate-button:active,
.modal-close:active,
.style-menu summary:active,
.field-block input:active,
.field-block select:active,
.color-field:active {
  transform: translateY(1px) scale(0.985);
  filter: saturate(1.08);
}

.preview-panel:active,
.control-section:active,
.hint-panel:active {
  transform: scale(0.998);
}

.picker-button:hover {
  border-color: rgba(78, 100, 43, 0.32);
  box-shadow: 0 14px 32px rgba(33, 43, 24, 0.12);
}

.picker-button span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.picker-button strong {
  color: var(--olive-dark);
  font-size: 14px;
}

.size-control {
  display: grid;
  grid-template-columns: auto 1fr 44px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.size-control input {
  accent-color: var(--olive-dark);
}

.size-control output {
  color: var(--ink-soft);
  font-weight: 900;
  text-align: right;
}

.generate-button,
#downloadBtn,
.modal-close {
  border: 0;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.26), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(135deg, var(--olive-dark), var(--olive));
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  padding: 9px 12px;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(37, 51, 21, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.preview-toolbar .generate-button {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.3), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(135deg, #18240e, #58702f);
}

#downloadBtn {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.3), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 42%),
    linear-gradient(135deg, #886d20, #c8a846);
  color: #17170f;
}

.generate-button:hover,
#downloadBtn:hover,
.modal-close:hover {
  box-shadow: 0 18px 36px rgba(37, 51, 21, 0.26);
}

.style-menu {
  position: relative;
  z-index: 4;
  border: 1px solid rgba(200, 168, 70, 0.3);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.8), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 237, 0.8));
  box-shadow: var(--shadow-soft);
  overflow: visible;
  isolation: isolate;
}

.style-menu[open] {
  z-index: 12;
  border-color: rgba(78, 100, 43, 0.28);
}

.style-menu summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.style-menu summary:hover span,
.style-menu[open] summary span {
  color: var(--olive-dark);
}

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

.style-menu summary span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.style-menu summary strong {
  color: var(--olive);
  font-size: 12px;
  font-weight: 900;
}

.style-menu summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(78, 100, 43, 0.14), rgba(200, 168, 70, 0.16));
  color: var(--olive-dark);
  font-weight: 900;
}

.style-menu[open] summary::after {
  content: "-";
}

.style-grid {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: min(380px, 54vh);
  overflow: auto;
  border: 1px solid rgba(200, 168, 70, 0.34);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.98), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.985), rgba(244, 247, 237, 0.97));
  box-shadow: var(--shadow-float);
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(78, 100, 43, 0.45) transparent;
}

.style-chip,
.template-chip,
.font-chip {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 241, 0.86));
  color: var(--ink-soft);
  padding: 12px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.style-chip:hover,
.template-chip:hover,
.font-chip:hover {
  border-color: rgba(78, 100, 43, 0.36);
  background: rgba(255, 255, 255, 0.96);
  color: var(--olive-dark);
  box-shadow: 0 10px 24px rgba(31, 42, 24, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.style-chip.active,
.template-chip.active,
.font-chip.active {
  border-color: rgba(78, 100, 43, 0.58);
  background:
    linear-gradient(135deg, rgba(78, 100, 43, 0.14), rgba(200, 168, 70, 0.16)),
    #ffffff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 10px 26px rgba(78, 100, 43, 0.12);
}

.hint-panel {
  grid-column: 1;
  border: 1px solid rgba(200, 168, 70, 0.24);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.75), transparent 36%),
    linear-gradient(135deg, rgba(251, 252, 248, 0.9), rgba(245, 247, 239, 0.78));
  box-shadow: var(--shadow-soft);
  padding: 14px 16px;
  align-self: start;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

@keyframes titleCharIn {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.92);
    filter: blur(7px);
  }
  58% {
    opacity: 0.9;
    transform: translateY(-4px) scale(1.04);
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes titleCharFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  46% { transform: translateY(-3px) scale(1.012); }
  62% { transform: translateY(1px) scale(0.998); }
}

@keyframes titleSweep {
  0% { transform: translateX(-120%) skewX(-16deg); opacity: 0; }
  14% { opacity: 0.86; }
  38% { opacity: 0.5; }
  52%, 100% { transform: translateX(120%) skewX(-16deg); opacity: 0; }
}

.hint-panel p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.preview-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 12px;
  background: rgba(246, 248, 241, 0.76);
  box-shadow: 0 18px 45px rgba(22, 31, 17, 0.14);
  backdrop-filter: blur(14px);
}

#downloadBtn,
.preview-toolbar .generate-button {
  min-height: 46px;
  width: 100%;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 16%, rgba(200, 168, 70, 0.14), transparent 28%),
    rgba(18, 24, 14, 0.5);
  backdrop-filter: blur(16px);
}

.modal-backdrop.open {
  display: flex;
}

.choice-modal {
  width: min(1100px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(243, 246, 238, 0.97));
  box-shadow: 0 42px 130px rgba(13, 24, 8, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  padding: 26px;
  scrollbar-width: thin;
  scrollbar-color: rgba(78, 100, 43, 0.45) transparent;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(36, 48, 30, 0.1);
}

.modal-head p {
  margin: 0 0 4px;
  color: var(--olive);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.modal-head h2 {
  margin: 0;
  font-family: "Playfair Display", Inter, serif;
  font-size: 30px;
  line-height: 1;
  text-wrap: balance;
}

.option-category {
  margin-top: 18px;
  border: 1px solid rgba(36, 48, 30, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.46);
  padding: 12px;
}

.option-category strong {
  display: block;
  margin-bottom: 10px;
  color: var(--olive-dark);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.template-grid,
.font-grid {
  display: grid;
  gap: 10px;
}

.template-chip,
.font-chip {
  min-height: 44px;
  text-align: center;
}

.template-grid {
  grid-template-columns: repeat(5, 1fr);
}

.font-grid {
  grid-template-columns: repeat(5, 1fr);
}

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

  .hero-title-char {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    width: min(100% - 34px, 1180px);
    padding-top: 30px;
  }

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

  .copy-block {
    grid-template-columns: 1fr;
    padding: 18px 20px 22px;
  }

  .intro {
    justify-self: stretch;
    max-width: none;
  }

  .style-grid,
  .style-menu,
  .hint-panel {
    grid-column: 1;
  }

  .generator-form {
    position: static;
  }
}

@media (max-width: 860px) {
  .input-grid,
  .picker-row,
  .color-grid,
  .canvas-grid,
  .custom-size-grid,
  .style-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .choice-modal {
    width: min(720px, 100%);
  }

  .hero-panel {
    gap: 16px;
  }

  .preview-panel,
  .generator-form {
    border-radius: 10px;
  }
}

@media (max-width: 540px) {
  .app-shell {
    width: min(100% - 20px, 1240px);
    padding: 18px 0 24px;
  }

  h1 {
    font-size: clamp(36px, 11vw, 52px);
  }

  .copy-block {
    padding: 14px 14px 18px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.12em;
    padding: 6px 8px;
  }

  .intro {
    font-size: 14px;
    line-height: 1.68;
  }

  .preview-panel,
  .generator-form,
  .choice-modal {
    padding: 12px;
  }

  .control-section {
    padding: 12px;
  }

  .preview-toolbar {
    gap: 8px;
    padding: 8px;
  }

  #downloadBtn,
  .preview-toolbar .generate-button {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 12px;
  }

  .preview-panel {
    padding-top: 30px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .choice-modal {
    max-height: calc(100vh - 20px);
  }

  .modal-head {
    align-items: flex-start;
  }

  .modal-head h2 {
    font-size: 24px;
  }

  .modal-close {
    padding: 8px 10px;
  }

  .input-grid,
  .picker-row,
  .color-grid,
  .canvas-grid,
  .custom-size-grid,
  .style-grid,
  .template-grid,
  .font-grid {
    grid-template-columns: 1fr;
  }

  .preview-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .size-control {
    grid-template-columns: 1fr 44px;
  }

  .size-control label {
    grid-column: 1 / -1;
  }

  .style-grid {
    max-height: min(340px, 56vh);
  }
}
