@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&display=swap");

:root {
  --bg-base: #ffffff;
  --bg-surface: #ffffff;
  --bg-soft: #f0f0ee;
  --bg-hover: #eaeae8;
  --ink-main: #1c1c1c;
  --ink-mid: #555555;
  --ink-muted: #999999;
  --ink-faint: #bbbbbb;
  --line: #e8e8e6;
  --line-strong: #d4d4d2;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: #eff6ff;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --radius: 8px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  color: var(--ink-main);
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-base);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

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

.site-wrap {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 16px;
  padding-bottom: 24px;
}

/* ── Navigation ── */

.top-nav {
  position: relative;
  margin-bottom: 12px;
  background: #ffffff;
}

.language-suggest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(64, 179, 224, 0.35);
  border-radius: 8px;
  background: rgba(240, 249, 255, 0.92);
  color: #075985;
  font-size: 13px;
  font-weight: 700;
}

.language-suggest[hidden] {
  display: none;
}

.language-suggest-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.language-suggest a {
  color: #0369a1;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.language-suggest button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.1);
  color: #075985;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.top-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .header-logo {
  height: 32px;
  width: auto;
}

.brand-divider {
  color: var(--ink-faint);
  font-size: 14px;
  font-weight: 500;
}

.brand-page-title {
  color: var(--ink-mid);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.1px;
  white-space: nowrap;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink-mid);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  transition: all 120ms ease;
}

.header-external-icon {
  font-size: 12px;
  line-height: 1;
}

.header-external-link:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

@media (max-width: 767px) {
  .top-nav-actions .header-external-link {
    display: none;
  }

  .top-nav-actions {
    gap: 4px;
  }
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 13px;
  transition: all 120ms ease;
}

.nav-link:hover {
  color: var(--ink-main);
  background: var(--bg-soft);
}

.nav-link.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}

/* ── Hamburger ── */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background 120ms ease;
}

.hamburger-btn:hover {
  background: var(--bg-soft);
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink-main);
  border-radius: 2px;
}

.hamburger-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
  background: transparent;
}

.hamburger-menu.open {
  max-height: 82vh;
}

.hamburger-menu-inner {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(280px, 1.5fr) minmax(150px, 0.85fr);
  align-items: start;
  gap: 18px;
  margin: 8px 16px 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  max-height: calc(82vh - 20px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
}

.hamburger-promo-link {
  display: block;
  padding: 12px 14px 10px;
  border-bottom: 1px dashed var(--line);
}

.hamburger-promo-img {
  display: block;
  width: 168px;
  max-width: 100%;
  height: auto;
}

.hamburger-group {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.hamburger-group-title {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.hamburger-group-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.hamburger-group-tools .hamburger-group-links {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  column-gap: 12px;
}

.hamburger-item {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  padding: 7px 2px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.hamburger-item:not(:last-child) {
  border-bottom-color: transparent;
}

.hamburger-item:hover {
  border-color: transparent;
  background: transparent;
  color: #0369a1;
}

.hamburger-item.active {
  border-color: transparent;
  background: transparent;
  color: #0369a1;
}

.hamburger-group-divider {
  height: 1px;
  margin: 8px 12px;
  background: var(--line-strong);
}

/* ── Step 2 Ad ── */
.step2-ad-wrap {
  margin-bottom: 12px;
  display: flex;
  justify-content: flex-start;
}

.step2-ad-unit {
  width: 300px;
  height: 250px;
  max-width: 100%;
}

/* ── Title ── */

.title-block {
  margin-bottom: 20px;
}

.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ink-main);
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 13px;
}

/* ── Studio Grid ── */

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 12px;
  align-items: stretch;
}

/* ── Panel / Card ── */

.panel,
.detail-card,
.font-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.panel-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  margin: 0;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-mid);
  letter-spacing: -0.1px;
}

.panel-body {
  padding: 14px;
  flex: 1;
}

/* ── Form Elements ── */

.form-group {
  margin-bottom: 14px;
}

/* 팔레트+배경색 / 폰트+마스크 가로 배치 */
.option-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}

.option-main {
  flex: 1;
  min-width: 0;
  margin-bottom: 0 !important;
}

.option-side {
  flex-shrink: 0;
  margin-bottom: 0 !important;
}

.form-hint {
  margin: -6px 0 8px;
  font-size: 11px;
  color: var(--ink-faint);
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mid);
}

.form-help,
.muted {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 11px;
}

.form-help-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.form-help-row .form-help {
  margin-top: 0;
}

.text-count {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--ink-main);
  font: inherit;
  font-size: 13px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.input,
.select {
  height: 36px;
  padding: 0 10px;
}

.textarea {
  min-height: 320px;
  resize: vertical;
  padding: 10px;
  line-height: 1.65;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-faint);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.inline-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

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

.keyword-weight-rows {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.keyword-weight-row {
  display: grid;
  grid-template-columns: minmax(0, 150px) auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.keyword-weight-label {
  margin: 0;
  white-space: nowrap;
  font-size: 11px;
}

.keyword-weight-range {
  min-width: 0;
  margin: 0;
}

.keyword-weight-row .slider-value {
  min-width: 32px;
}

.slider-field {
  margin-bottom: 0 !important;
}

.contour-group {
  margin-bottom: 0 !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fbf9;
  padding: 10px;
}

.contour-group-label {
  margin-bottom: 10px;
  color: var(--ink-main);
  font-weight: 700;
}

.contour-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.contour-style-field,
.contour-color-field {
  min-width: 0;
}

.contour-preview-field {
  grid-column: 1 / -1;
}

.contour-style-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.contour-style-btn {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink-mid);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.contour-style-btn:hover {
  border-color: #79bee9;
  background: #f4fbff;
  color: #1a6ea6;
}

.contour-style-btn.selected {
  border-color: #55bdf8;
  background: #e8f4ff;
  color: #2b82c9;
}

.slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.slider-head .form-label {
  margin-bottom: 0;
}

.slider-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e8f4ff;
  color: #2b82c9;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.range-slider {
  --range-percent: 50%;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  border: 1px solid #cfe2f3;
  background: linear-gradient(90deg,
      #55bdf8 0%,
      #55bdf8 var(--range-percent),
      #edf5fb var(--range-percent),
      #edf5fb 100%);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.range-slider:focus {
  box-shadow: 0 0 0 3px rgba(85, 189, 248, 0.22);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: linear-gradient(180deg, #86d4ff 0%, #3ea8ee 100%);
  box-shadow: 0 2px 6px rgba(45, 129, 186, 0.24);
  cursor: pointer;
}

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: linear-gradient(180deg, #86d4ff 0%, #3ea8ee 100%);
  box-shadow: 0 2px 6px rgba(45, 129, 186, 0.24);
  cursor: pointer;
}

.range-slider::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  border: 1px solid #cfe2f3;
  background: #edf5fb;
}

.range-slider::-moz-range-progress {
  height: 12px;
  border-radius: 999px;
  border: 1px solid #44acee;
  background: #55bdf8;
}

/* ── Image Dropdown Picker ── */

.img-dropdown {
  position: relative;
}

.img-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  padding: 3px 10px 3px 4px;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  min-height: 36px;
}

.img-dropdown-trigger:hover {
  border-color: var(--line-strong);
}

.img-dropdown.open .img-dropdown-trigger {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.img-dropdown-trigger img {
  display: block;
  width: 80%;
  height: 50px;
  object-fit: contain;
  flex: 1;
  min-width: 0;
}

.dropdown-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.dropdown-label {
  font-size: 11px;
  color: var(--ink-mid);
  font-weight: 500;
  text-align: center;
  word-break: break-word;
  line-height: 1.2;
}

.img-dropdown-arrow {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--ink-muted);
  transition: transform 150ms ease;
}

.img-dropdown.open .img-dropdown-arrow {
  transform: rotate(180deg);
}

/* dropdown panel */
.img-dropdown-panel {
  display: none;
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
  padding: 4px;
}

.img-dropdown.open .img-dropdown-panel {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.img-dropdown-panel::-webkit-scrollbar {
  width: 4px;
}

.img-dropdown-panel::-webkit-scrollbar-track {
  background: transparent;
}

.img-dropdown-panel::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

/* dropdown item */
.img-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  padding: 3px 6px;
  cursor: pointer;
  transition: all 80ms ease;
  flex-shrink: 0;
}

.img-dropdown-item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 36px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 80ms ease;
}

.img-dropdown-item:hover {
  background: var(--bg-soft);
}

.img-dropdown-item:hover img {
  opacity: 1;
}

.img-dropdown-item.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.img-dropdown-item.selected img {
  opacity: 1;
}

/* grid variant panel (mask, bgcolor) */
.img-dropdown.open .img-dropdown-panel.panel-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.panel-grid .img-dropdown-item {
  padding: 4px;
  aspect-ratio: 1;
}

.panel-grid .img-dropdown-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* trigger swatch (for mask / bgcolor) */
.img-dropdown-trigger .color-swatch {
  flex: 1;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* panel swatch items */
.img-dropdown-item .color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ── Chip Label (fallback text) ── */

.chip-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mid);
  text-align: center;
  word-break: keep-all;
  line-height: 1.3;
}

/* ── Preview ── */

.preview-panel {
  position: static;
}

.preview-box {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  background: #ffffff;
  aspect-ratio: 1;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 6px 0;
}

.preview-image {
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
  display: block;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 28, 28, 0.4);
  backdrop-filter: blur(2px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

/* ── Buttons ── */

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  min-height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 120ms ease;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.btn-primary:active:not(:disabled) {
  background: #1e40af;
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--line);
  color: var(--ink-main);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-soft);
  border-color: var(--line-strong);
}

/* Preview panel buttons */
.btn-generate,
.btn-download {
  width: 100%;
  margin-bottom: 0;
}

.btn-generate {
  margin-bottom: 6px;
}

.btn-download {
  margin-top: 12px;
}

/* ── Status ── */

.status {
  margin-top: 10px;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  display: none;
}

.status.info {
  display: block;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid #bfdbfe;
}

.status.success {
  display: block;
  background: #f0fdf4;
  color: var(--success);
  border: 1px solid #bbf7d0;
}

.status.error {
  display: block;
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

/* ── Tips ── */

.tips {
  margin-top: 12px;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.6;
}

/* ── Below studio: comments + ad ── */

.below-studio {
  display: flex;
  gap: 24px;
  max-width: 960px;
  margin: 32px auto 0;
  padding: 0 16px;
  align-items: flex-start;
}

.below-studio-comments {
  flex: 1 1 0;
  min-width: 0;
}

.below-studio-ad {
  flex: 0 0 300px;
  width: 300px;
}


/* ── Ad block (mobile standalone) ── */

.ad-block {
  width: 100%;
  margin: 16px 0;
}

/* ── Footer ── */

.footer {
  margin-top: 32px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 22px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: #0b1120;
  color: #94a3b8;
  font-size: 12px;
  text-align: left;
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 2.25fr);
  gap: 24px;
  align-items: start;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.footer-brand-block p {
  max-width: 260px;
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.55;
}

.footer-play-link {
  display: inline-flex;
  justify-content: flex-start;
  align-self: flex-start;
}

.footer-play-img {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
  filter: saturate(0.95);
}

.footer-nav-groups {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr 0.7fr 0.9fr;
  gap: 14px;
  align-items: start;
}

.footer-group {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.72);
}

.footer-group h2 {
  margin: 0 0 10px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.footer-subtitle {
  margin: 14px 0 8px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.footer-group-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 6px;
}

.footer-recommended-links {
  grid-template-columns: 1fr;
}

.footer-menu-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.footer-menu-link:hover {
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(30, 64, 175, 0.28);
  color: #ffffff;
  text-decoration: none;
}

.footer-info {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
  color: #94a3b8;
}

.footer-info span {
  display: inline-block;
}

.footer-mobile-link {
  font-size: 12px;
  color: #93c5fd;
  text-decoration: none;
}

.footer-mobile-link:hover {
  text-decoration: underline;
}

.footer-flags {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  font-size: 22px;
}

.footer-flag {
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 120ms ease;
}

.footer-flag.active,
.footer-flag:hover {
  opacity: 1;
}

@media (max-width: 920px) {
  .footer-content {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .footer {
    padding: 20px 12px;
  }

  .footer-nav-groups {
    grid-template-columns: 1fr;
  }

  .footer-group-links {
    grid-template-columns: 1fr;
  }
}

/* ── Font List Page ── */

.search-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 8px;
  margin-bottom: 16px;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.font-card {
  transition: box-shadow 150ms ease, border-color 150ms ease;
}

.font-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.font-thumb {
  height: 130px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.font-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.font-body {
  padding: 10px 12px;
}

.font-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-main);
}

.font-maker {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

/* ── Font Detail Page ── */

.detail-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
}

.detail-card {
  padding: 16px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table th,
.detail-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 13px;
}

.detail-table th {
  width: 100px;
  color: var(--ink-muted);
  font-weight: 600;
}

/* ── Utility ── */

.hidden {
  display: none;
}

/* ── Modal Picker ── */

/* 팔레트·폰트 트리거 버튼 (가로 전체 + 이미지 높이 고정) */
.modal-trigger-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-main);
  transition: border-color 120ms ease, box-shadow 120ms ease;
  overflow: hidden;
}

.modal-trigger-btn:hover {
  border-color: var(--line-strong);
  background: var(--bg-soft);
}

.modal-trigger-btn:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.trigger-arrow {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--ink-muted);
}

/* 팔레트·폰트 트리거: 이미지 높이 48px 고정 */
#colormapTriggerContent,
#fontTriggerContent {
  display: flex;
  align-items: center;
  height: 48px;
  overflow: hidden;
}

#colormapTriggerContent img,
#fontTriggerContent img {
  height: 48px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  border-radius: 3px;
}

/* 배경색·마스크 트리거: 팔레트/폰트 버튼과 동일 높이 정사각형 */
#colorTrigger,
#maskTrigger {
  width: 62px;
  height: 62px;
  padding: 0;
  position: relative;
  overflow: hidden;
  justify-content: center;
}

#colorTrigger .trigger-arrow,
#maskTrigger .trigger-arrow {
  position: absolute;
  bottom: 4px;
  right: 5px;
  margin: 0;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 3px;
  padding: 1px 3px;
  font-size: 10px;
  line-height: 1;
  z-index: 1;
}

#colorTriggerContent {
  width: 100%;
  height: 100%;
  display: flex;
}

#colorTriggerContent .color-swatch {
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: block;
}

#contourColorTriggerContent {
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
}

#contourColorTriggerContent .color-swatch {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.contour-line-preview {
  width: 100%;
  height: 60px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contour-line-preview-line {
  width: 100%;
  height: 0;
  background: transparent;
  border-top: 2px solid #000000;
  display: block;
  transition: border-top-width 120ms ease, border-top-color 120ms ease, filter 120ms ease, opacity 120ms ease;
}

#maskTriggerContent {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

#maskTriggerContent img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-container {
  background: var(--bg-surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 420px;
  height: auto;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  z-index: 1001;
  animation: modalSlideIn 150ms ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-main);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  color: var(--ink-muted);
  transition: color 120ms ease;
}

.modal-close-btn:hover {
  color: var(--ink-main);
}

.modal-grid {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
}

.modal-grid-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--bg-soft);
  transition: all 120ms ease;
  padding: 1px;
  min-height: 32px;
  max-height: 32px;
}

.modal-grid-item:hover {
  background: var(--bg-hover);
  border-color: var(--line-strong);
}

.modal-grid-item.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.modal-grid-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.modal-grid-item .color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 3px;
  border: none;
}

/* ── Custom Color Input ── */

.modal-custom-section {
  padding: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  align-items: center;
}

.modal-custom-section label {
  font-size: 12px;
  color: var(--ink-mid);
  white-space: nowrap;
}

.modal-color-input-group {
  display: flex;
  gap: 8px;
  flex: 1;
}

.modal-color-picker {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 2px;
}

.modal-color-input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
}

.modal-color-input::placeholder {
  color: var(--ink-faint);
}

.modal-color-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* ── Modal List Picker ── */

.modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  align-content: start;
}

.modal-list-item {
  padding: 10px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--bg-surface);
  transition: all 120ms ease;
  font-family: inherit;
  font-size: 11px;
  color: var(--ink-muted);
  width: 100%;
  text-align: center;
}

.modal-list-item:hover {
  background: var(--bg-hover);
  border-color: var(--line-strong);
}

.modal-list-item.selected {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

.modal-list-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ── List Picker ── */

.list-picker {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.list-picker-item {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: var(--bg-surface);
  transition: background 120ms ease;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-main);
  width: 100%;
  text-align: left;
}

.list-picker-item:last-child {
  border-bottom: none;
}

.list-picker-item:hover {
  background: var(--bg-soft);
}

.list-picker-item.selected {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.list-picker-item img {
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.list-picker-item .color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── How to Use Section ── */

.how-to-use-section {
  margin-top: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-main);
  margin-bottom: 24px;
  text-align: center;
}

.mt-40 {
  margin-top: 40px !important;
}

.usage-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.usage-list li {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.usage-list li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--line-strong);
  background: #fbfbfc;
}

.usage-icon {
  font-size: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-soft);
  border-radius: 12px;
}

.usage-text {
  font-size: 13.5px;
  color: var(--ink-mid);
  line-height: 1.6;
}

.usage-text strong {
  display: block;
  font-size: 14.5px;
  color: var(--ink-main);
  margin-bottom: 4px;
}

.usage-text a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 900px) {
  .usage-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1199px) {
  .studio-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  }

  .preview-panel {
    grid-column: 1 / -1;
  }

  .preview-box {
    aspect-ratio: 16 / 9;
  }

  .preview-image {
    max-height: 520px;
  }
}

@media (max-width: 900px) {
  .top-nav-inner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .hamburger-menu-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hamburger-group-tools .hamburger-group-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand {
    min-width: 0;
  }

  .brand .header-logo {
    max-width: min(220px, 58vw);
  }

  .studio-grid,
  .detail-wrap,
  .search-row {
    grid-template-columns: 1fr;
  }

  .panel-body {
    padding: 12px;
  }

  .textarea {
    min-height: 260px;
  }

  .preview-box {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  .site-wrap {
    padding: 0 10px 20px;
  }

  .top-nav-inner {
    gap: 8px;
    padding: 8px 0;
  }

  .brand .header-logo {
    height: 28px;
    max-width: 62vw;
  }

  .header-external-link {
    padding: 7px 8px;
    font-size: 12px;
  }

  .hamburger-menu-inner {
    margin: 8px 0 12px;
    padding: 14px;
  }

  .hamburger-group-tools .hamburger-group-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .option-row {
    flex-direction: column;
    gap: 10px;
  }

  .option-main,
  .option-side {
    width: 100%;
  }

  #colorTrigger,
  #maskTrigger {
    width: 100%;
    height: 48px;
  }

  #maskTriggerContent img {
    max-width: 44px;
  }

  .contour-grid,
  .inline-row,
  .inline-row-3 {
    grid-template-columns: 1fr;
  }

  .keyword-weight-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .keyword-weight-row .input {
    grid-column: 1 / -1;
  }

  .keyword-weight-label {
    grid-column: 1 / 2;
  }

  .keyword-weight-range {
    grid-column: 1 / 2;
  }

  .keyword-weight-row .slider-value {
    grid-column: 2 / 3;
    grid-row: 3;
  }

  .form-help-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .textarea {
    min-height: 220px;
  }

  .step2-ad-wrap {
    justify-content: center;
  }

  .preview-box {
    aspect-ratio: 1;
  }

  .preview-image {
    max-height: 80vw;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .modal-container {
    width: 100%;
    max-height: min(84vh, 720px);
  }

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

  .modal-list {
    grid-template-columns: 1fr;
  }

  .modal-custom-section,
  .modal-color-input-group {
    flex-wrap: wrap;
  }

  .usage-list {
    gap: 12px;
  }

  .usage-list li {
    gap: 12px;
    padding: 14px;
  }

  .usage-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .footer-info {
    gap: 6px 12px;
  }
}

@media (max-width: 380px) {
  .top-nav-actions {
    width: 100%;
    justify-content: flex-end;
  }

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

  .contour-style-buttons {
    grid-template-columns: 1fr;
  }
}
