/* ============================================================
   WiFi QR Generator - Global Stylesheet
   ============================================================ */

/* Google Fonts loaded via HTML */

/* ============ CSS VARIABLES ============ */
:root {
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --primary-light: #E0F2FE;
  --primary-ultra: #F0F9FF;
  --accent: #F97316;
  --accent-dark: #EA6A0A;
  --accent-light: #FFF7ED;
  --dark: #0F172A;
  --dark-2: #1E293B;
  --dark-3: #334155;
  --text: #0F172A;
  --text-sec: #475569;
  --text-muted: #94A3B8;
  --bg-light: #F8FAFC;
  --bg-warm: #FAFAF9;
  --bg-cream: #F5F5F0;
  --bg-white: #ffffff;
  --border: #E2E8F0;
  --border-dark: #CBD5E1;
  --success: #22c55e;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 8px rgba(15,23,42,0.06);
  --shadow: 0 4px 24px rgba(15,23,42,0.08);
  --shadow-lg: 0 12px 48px rgba(15,23,42,0.14);
  --shadow-blue: 0 8px 32px rgba(14,165,233,0.28);
  --transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
  --nav-h: 64px;
  --nav-desktop-min: 1361px;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg-white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.site-main {
  position: relative;
  z-index: 1;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-sec); }

/* ============ CONTAINER ============ */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-sm {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ NAVIGATION ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(241,245,249,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #94A3B8;
  box-shadow: 0 2px 8px rgba(15,23,42,0.08);
  z-index: 2000;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  min-width: 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-weight: 900;
  font-size: 1.35rem;
  background: linear-gradient(90deg, #FF6B9D, #FFA07A, #FFD93D, #6BCF7F, #4D96FF, #9D4EDD);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  position: relative;
}
.nav-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  -webkit-text-fill-color: initial;
}
.nav-logo span {
  background: inherit;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-logo,
.nav-logo .logo-icon,
.nav-logo span {
  filter: none !important;
  -webkit-filter: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-cta-short {
  display: none;
}
.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-sec);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover { background: var(--bg-light); color: var(--text); }
.nav-link.active { color: var(--primary); background: var(--primary-light); }
.nav-links-desktop {
  display: none !important;
}
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle:hover {
  background: var(--bg-light);
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-menu-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-menu-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
body.nav-menu-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.nav-backdrop {
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  z-index: 2090;
  background: rgba(15, 23, 42, 0.5);
  border: none;
  padding: 0;
  cursor: pointer;
}
.nav-backdrop[hidden] {
  display: none !important;
}
body.nav-menu-open .nav-backdrop:not([hidden]) {
  display: block;
}
.nav-drawer {
  display: flex;
  position: fixed;
  top: var(--nav-h);
  right: 0;
  bottom: 0;
  z-index: 2100;
  width: min(300px, 88vw);
  margin: 0;
  padding: 20px 16px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  background: #fff;
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.15);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
}
body.nav-menu-open .nav-drawer {
  transform: translateX(0);
  visibility: visible;
}
.nav-drawer .nav-link {
  padding: 14px 16px;
  font-size: 1rem;
  min-height: 48px;
  display: flex;
  align-items: center;
  white-space: normal;
}
.nav-drawer .nav-cta {
  margin-top: 8px;
  text-align: center;
  justify-content: center;
}
.nav-drawer .nav-cta-long {
  display: inline;
}
.nav-drawer .nav-cta-short {
  display: none;
}
.nav-cta {
  padding: 9px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white !important;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(249,115,22,0.25);
}
.nav-cta:hover {
  background: linear-gradient(135deg, var(--accent-dark), #c45508);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249,115,22,0.35);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.97rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 4px 16px rgba(249,115,22,0.3);
}
.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-dark), #c45508);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(249,115,22,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}
.btn-ghost {
  background: transparent;
  color: var(--text-sec);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-light);
  border-color: var(--text-muted);
}
/* 히어로 「샘플 보기」 — 보조 CTA이지만 눈에 띄게 */
.btn-hero-sample {
  background: #fff;
  color: var(--primary-dark);
  border: 2px solid var(--primary);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.22);
  font-weight: 700;
}
.btn-hero-sample:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.32);
}
.btn-lg { padding: 17px 36px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-icon {
  width: 42px; height: 42px;
  padding: 0;
  border-radius: 10px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ============ BADGE / TAG ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-accent { background: #fff0eb; color: var(--accent); }

/* ============ SECTION ============ */
.section {
  padding: 88px 0;
}
.section-sm { padding: 56px 0; }
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-head .badge { margin-bottom: 16px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p {
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ============ HERO SECTION ============ */
.hero {
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  background: linear-gradient(145deg, #F0F9FF 0%, #E0F2FE 40%, #EFF6FF 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(14,165,233,0.12) 0%, transparent 70%);
  top: -80px; right: -120px;
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(249,115,22,0.07) 0%, transparent 70%);
  bottom: 0; left: 40px;
  border-radius: 50%;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 36px 0 40px;
}
.hero-content { max-width: 560px; }
.hero-content .badge { margin-bottom: 20px; }
.hero-title {
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
}
.hero-title-line {
  display: block;
}
.hero-title .highlight {
  color: var(--primary);
  position: relative;
}
.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 0; right: 0;
  height: 4px;
  background: var(--primary);
  opacity: 0.2;
  border-radius: 2px;
}
.hero-desc {
  font-size: 1.1rem;
  color: var(--text-sec);
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.hero-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}
.hero-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-mockup {
  position: relative;
  width: 340px;
  max-width: 100%;
}
.hero-mockup::before {
  content: '';
  position: absolute;
  top: -12px; left: -12px; right: -12px; bottom: -12px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(0,168,232,0.12), rgba(255,107,53,0.08));
  z-index: -1;
}
.hero-mockup-img {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ============ FEATURES SECTION ============ */
.features-section {
  background: linear-gradient(165deg, #E8F5E9 0%, #E0F2F1 50%, #E8F6E8 100%);
  position: relative;
}
.features-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(76,175,80,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.features-section .container { position: relative; z-index: 1; }
.features-section .section-tag {
  background: rgba(200,230,201,0.8);
  color: #2E7D32;
  border: 1px solid rgba(102,187,106,0.3);
}
.features-section h2 { color: #1B5E20; }
.features-section .section-head p { color: #388E3C; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: rgba(250,255,252,0.9);
  border: 1px solid rgba(165,214,167,0.5);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(27,94,32,0.05);
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #66BB6A, #43A047);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
  border-radius: 2px 2px 0 0;
}
.feature-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.98);
  border-color: rgba(102,187,106,0.6);
  box-shadow: 0 12px 28px rgba(46,125,50,0.12);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 52px; height: 52px;
  background: rgba(200,230,201,0.7);
  border: 1px solid rgba(129,199,132,0.4);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 18px;
  transition: var(--transition);
}
.feature-card:hover .feature-icon {
  background: rgba(165,214,167,0.85);
  border-color: rgba(102,187,106,0.5);
  transform: scale(1.05);
}
.feature-card h3 { margin-bottom: 10px; font-size: 1.05rem; color: #1B5E20; font-weight: 700; }
.feature-card--image-only {
  padding: 16px;
  display: flex;
  align-items: center;
}
.feature-card--image-only .feature-card-preview {
  margin: 0;
  width: 100%;
}
.feature-card-preview {
  margin: 0 0 14px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(165,214,167,0.4);
  box-shadow: 0 4px 14px rgba(27,94,32,0.06);
}
.feature-card-preview img,
.feature-card-preview canvas {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}
.feature-card p { font-size: 0.88rem; line-height: 1.75; color: #2E7D32; }
.feature-card p + p { margin-top: 0.65rem; }

/* ============ HOW IT WORKS ============ */
.how-it-works {
  background: linear-gradient(170deg, #F3E5F5 0%, #EDE7F6 50%, #F5F0FA 100%);
  position: relative;
}
.how-it-works::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 55% at 50% 50%, rgba(156,39,176,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.how-it-works .container { position: relative; z-index: 1; }
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}
.steps-row::before {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(16.66% + 40px);
  right: calc(16.66% + 40px);
  height: 2px;
  background: linear-gradient(90deg, #E1BEE7, #9C27B0, #E1BEE7);
  opacity: 0.5;
}
.step-item {
  text-align: center;
  padding: 0 20px;
}
.step-num-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.step-num-wrap::before {
  content: '';
  position: absolute;
  width: 96px; height: 96px;
  background: #F3E5F5;
  border-radius: 50%;
  border: 2px solid #E1BEE7;
}
.step-num {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #AB47BC, #8E24AA);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  color: white;
  font-weight: 800;
  box-shadow: 0 8px 30px rgba(156,39,176,0.35);
  position: relative;
  z-index: 1;
}
.step-item h3 { margin-bottom: 10px; color: #6A1B9A; }
.step-item p { font-size: 0.9rem; color: #7B1FA2; }

/* ============ TEMPLATE GALLERY ============ */
.template-gallery { background: #FFF0F5; }
.gallery-section { background: #FFF0F5; }

.hotel-gallery-section {
  background: linear-gradient(165deg, #E8EEF7 0%, #F0F4FA 50%, #E3EBF5 100%);
}
.hotel-gallery-section .section-tag {
  background: rgba(30, 58, 138, 0.1);
  color: #1E3A8A;
  border: 1px solid rgba(30, 58, 138, 0.2);
}
.hotel-gallery-section h2 { color: #1E293B; }
.hotel-gallery-section .section-head p { color: #475569; }
.template-card-hotel { position: relative; }
.hotel-english-gallery-section {
  background: linear-gradient(165deg, #111827 0%, #1E293B 54%, #0F172A 100%);
}
.hotel-english-gallery-section .section-tag {
  background: rgba(245, 158, 11, 0.14);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.hotel-english-gallery-section h2 { color: #F8FAFC; }
.hotel-english-gallery-section .section-head p { color: #CBD5E1; }
.hotel-english-gallery-section .template-card {
  background: rgba(255,255,255,0.96);
  border-color: rgba(252,211,77,0.25);
}
.hotel-english-gallery-section .template-info {
  background: rgba(255,255,255,0.98);
}
.template-badge-hotel {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: #FF6B9D;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
}
body.hotel-mode .create-hero {
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 55%, #3B82F6 100%);
}
body.hotel-mode .tpl-card[data-tpl-id="1"],
body.hotel-mode .tpl-card[data-tpl-id="2"] {
  display: none !important;
}
#hotelTemplateGrid .template-card-horizontal {
  display: none;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.template-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.template-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-blue);
}
.template-thumb {
  aspect-ratio: 1 / 1.414;
  background: var(--bg-light);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.template-thumb canvas { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.template-card-horizontal {
  grid-column: span 2;
}
.template-card-horizontal .template-thumb {
  aspect-ratio: auto;
  height: auto;
}
.template-info {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-white);
}
.template-info h4 { font-size: 0.92rem; color: var(--text); }
.template-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,168,232,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  font-weight: 600;
  opacity: 0;
  transition: var(--transition);
}
.template-card:hover .template-overlay { opacity: 1; }
.template-badge-popular {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  z-index: 2;
}
.template-badge-best {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #FFB020;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  z-index: 2;
}

/* ============ TEMPLATE MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }
.modal-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  font-size: 1.2rem;
}
.modal-close:hover { background: var(--bg-light); color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============ FAQ ============ */
.faq-section {
  background: linear-gradient(165deg, #FFF4E6 0%, #FFE8CC 50%, #FFF6ED 100%);
  position: relative;
  overflow: hidden;
}
.faq-section::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,145,77,0.07) 0%, transparent 70%);
  top: -120px; right: -80px;
  pointer-events: none;
}
.faq-section::after {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,160,64,0.06) 0%, transparent 70%);
  bottom: -60px; left: -40px;
  pointer-events: none;
}
.faq-section .section-tag {
  background: rgba(255,213,153,0.8);
  color: #D84315;
  border: 1px solid rgba(255,171,102,0.4);
}
.faq-section h2 { color: #1a1a1a; }
.faq-section .section-head p { color: #333333; }
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.faq-item {
  background: rgba(255,255,255,0.88);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,171,102,0.35);
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(216,67,21,0.07);
}
.faq-item:hover {
  background: rgba(255,255,255,0.98);
  border-color: rgba(255,145,77,0.5);
  box-shadow: 0 4px 12px rgba(216,67,21,0.1);
}
.faq-item.open {
  background: rgba(255,244,230,0.85);
  border-color: rgba(230,74,25,0.6);
  box-shadow: 0 0 0 1px rgba(255,145,77,0.18), 0 8px 24px rgba(216,67,21,0.14);
}
.faq-question {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
  gap: 12px;
  transition: var(--transition);
  user-select: none;
}
.faq-question:hover { color: #000000; }
.faq-item.open .faq-question { color: #000000; }
.faq-icon {
  width: 26px; height: 26px;
  min-width: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,145,77,0.45);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
  color: #FF6E40;
  background: rgba(255,213,153,0.55);
}
.faq-item.open .faq-icon {
  background: #FF7043;
  border-color: #FF7043;
  color: white;
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(255,112,67,0.45);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s ease, padding 0.38s ease;
  padding: 0 24px;
}
.faq-answer p {
  font-size: 0.91rem;
  line-height: 1.82;
  color: #333333;
  border-top: 1px solid rgba(255,171,102,0.28);
  padding-top: 14px;
}
.faq-item.open .faq-answer {
  max-height: 240px;
  padding-bottom: 22px;
}

/* ============ CTA BANNER ============ */
.cta-banner {
  background: linear-gradient(135deg, #FF6B9D 0%, #FFA07A 20%, #FFD93D 40%, #6BCF7F 60%, #4D96FF 80%, #9D4EDD 100%);
  padding: 120px 0;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  top: -150px; right: -100px;
  animation: pulse 4s ease-in-out infinite;
}
.cta-banner::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  bottom: -100px; left: -80px;
  animation: pulse 5s ease-in-out infinite;
  animation-delay: 1s;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}
.cta-banner .container {
  position: relative;
  z-index: 1;
}
.cta-banner h2 {
  color: white;
  margin-bottom: 32px;
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.2;
  -webkit-text-stroke: 3px rgba(0,0,0,0.7);
  paint-order: stroke fill;
  animation: fadeInUp 0.8s ease;
  word-break: keep-all;
}
.cta-title-line {
  display: block;
}
.cta-banner p {
  color: white;
  font-size: clamp(1rem, 2.8vw, 2.4rem);
  margin-bottom: 60px;
  font-weight: 600;
  line-height: 1.4;
  -webkit-text-stroke: 2.5px rgba(0,0,0,0.6);
  paint-order: stroke fill;
  animation: fadeInUp 1s ease;
  word-break: keep-all;
}
.cta-desc-line {
  display: block;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.cta-banner .btn-accent {
  background: white;
  color: #FF6B35;
  font-size: 2rem;
  padding: 28px 72px;
  font-weight: 700;
  border-radius: 60px;
  border: 5px solid rgba(0,0,0,0.7);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: fadeInUp 1.2s ease, float 3s ease-in-out infinite;
  animation-delay: 0s, 1.5s;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.cta-banner .btn-accent:hover {
  background: #FFF8F0;
  border-color: rgba(0,0,0,0.9);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 20px rgba(255,255,255,0.5);
}

/* ============ AD SLOT (수동 AdSense만) ============ */
.site-ad {
  margin: 0 auto;
  padding: 24px 24px 8px;
  max-width: 1140px;
  min-height: 0;
  text-align: center;
  overflow: hidden;
  clear: both;
}
.site-ad[hidden] {
  display: none !important;
}
.site-ad ins.adsbygoogle {
  display: block;
  margin: 0 auto;
}
.site-ad--relocated {
  width: 100%;
  max-width: 1140px;
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  margin: 12px auto 18px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.site-ad--relocated > .google-auto-placed,
.site-ad--relocated > .google-auto-placed > ins,
.site-ad--relocated > ins.adsbygoogle,
.site-ad--relocated ins.adsbygoogle,
.site-ad--relocated [data-ad-container],
.site-ad--relocated iframe {
  width: 100% !important;
  max-width: 1140px !important;
  height: 100px !important;
  min-height: 0 !important;
  max-height: 100px !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}
.site-ad--relocated:empty,
.site-ad--relocated[hidden] {
  display: none !important;
}
@media (max-width: 768px) {
  .site-ad--relocated {
    width: 100%;
    max-width: calc(100% - 24px);
    height: 86px;
    min-height: 86px;
    max-height: 86px;
    margin: 10px auto 14px;
  }
  .site-ad--relocated > .google-auto-placed,
  .site-ad--relocated > .google-auto-placed > ins,
  .site-ad--relocated > ins.adsbygoogle,
  .site-ad--relocated ins.adsbygoogle,
  .site-ad--relocated [data-ad-container],
  .site-ad--relocated iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: 86px !important;
    min-height: 0 !important;
    max-height: 86px !important;
  }
}
.create-page .site-ad,
.find-page .site-ad {
  max-width: 720px;
}

/* ============ FOOTER ============ */
.footer {
  background: #0B1120;
  color: rgba(255,255,255,0.65);
  padding: 48px 0 28px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand .nav-logo { color: white; margin-bottom: 14px; }
.footer-brand .nav-logo span { color: var(--primary); }
.footer-brand p { font-size: 0.87rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 {
  font-size: 0.87rem;
  font-weight: 700;
  color: white;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a {
  font-size: 0.87rem;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-bottom-brand {
  font-weight: 600;
  color: rgba(255,255,255,0.92);
}
.footer-bottom-legal {
  color: rgba(255,255,255,0.55);
}

/* ============ CREATE PAGE ============ */
.create-page {
  min-height: 100vh;
  padding-top: var(--nav-h);
  background: var(--bg-light);
}
.create-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 40px 0 0;
  color: white;
  text-align: center;
}
.create-hero h1 { color: white; font-size: 1.8rem; margin-bottom: 8px; }
.create-hero p { color: rgba(255,255,255,0.8); font-size: 1rem; }

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0 0;
  gap: 0;
  max-width: 500px;
  margin: 0 auto;
}
.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}
.stepper-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 2px;
  background: rgba(255,255,255,0.3);
}
.stepper-step.done:not(:last-child)::after,
.stepper-step.active:not(:last-child)::after {
  background: rgba(255,255,255,0.7);
}
.step-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  background: transparent;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}
.stepper-step.active .step-circle {
  background: white;
  border-color: white;
  color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}
.stepper-step.done .step-circle {
  background: rgba(255,255,255,0.2);
  border-color: white;
  color: white;
}
.step-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}
.stepper-step.active .step-label { color: rgba(255,255,255,0.9); font-weight: 600; }
.stepper-step.done .step-label { color: rgba(255,255,255,0.7); }

/* Create Content */
.create-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 48px;
}
/* 2단계 WiFi 입력 아래 — 사용 설명서 */
.create-guide-section {
  margin-top: 24px;
}
.create-guide-card {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.create-guide-header h2 {
  font-size: 1rem;
}
.create-guide-body {
  padding: 12px 16px 16px !important;
}
.create-guide-figure {
  margin: 0;
  max-height: min(62vh, 720px);
  overflow: auto;
  overflow-x: hidden;
  border-radius: var(--radius);
  background: #f0f2f5;
  -webkit-overflow-scrolling: touch;
}
.create-guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}
@media (max-width: 768px) {
  .create-guide-figure {
    max-height: min(50vh, 480px);
  }
  .create-guide-body {
    padding: 8px 10px 12px !important;
  }
}
.create-step {
  display: none;
  animation: fadeInUp 0.35s ease;
}
.create-step.active { display: block; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Form Card */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}
.card-icon {
  width: 44px; height: 44px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.card-header h2 { font-size: 1.15rem; margin-bottom: 2px; }
.card-header p { font-size: 0.85rem; color: var(--text-muted); }
.card-body { padding: 28px; }
.card-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form Elements */
.form-group { margin-bottom: 22px; }
.form-group:last-child { margin-bottom: 0; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.form-label .required { color: var(--accent); margin-left: 3px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-white);
  transition: var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,168,232,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
.input-wrap {
  position: relative;
}
.input-wrap .form-control {
  padding-right: 48px;
}
.input-action {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 1rem;
  display: flex; align-items: center;
}
.input-action:hover { color: var(--primary); }
.form-select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,168,232,0.12);
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.form-check input[type=checkbox] {
  width: 18px; height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-check-label { font-size: 0.9rem; color: var(--text-sec); }

/* Template Selector */
.template-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.tpl-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.tpl-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-blue);
}
.tpl-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,168,232,0.2);
}
.tpl-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 8px;
  width: 24px; height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
}
.tpl-thumb {
  aspect-ratio: 1 / 1.414;
  background: var(--bg-light);
  overflow: hidden;
  position: relative;
}
.tpl-thumb canvas { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.tpl-label {
  padding: 10px 12px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  background: white;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.tpl-label .tpl-label-name { line-height: 1.35; }
.tpl-label small { color: var(--text-muted); font-weight: 400; font-size: 0.75rem; white-space: nowrap; margin-left: 8px; }

/* Preview Step */
.preview-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
.preview-canvas-wrap {
  background: #e8eaed;
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
}
#previewCanvas {
  border-radius: 4px;
  box-shadow: 0 6px 32px rgba(0,0,0,0.18);
  max-width: 100%;
  height: auto;
  display: block;
}
/* 3단계 — 가로형 템플릿(1·2번) 미리보기 */
.preview-layout--horizontal {
  grid-template-columns: 1fr;
  max-width: 960px;
  margin: 0 auto;
}
.preview-layout--horizontal .preview-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.preview-canvas-wrap--horizontal,
#step3.step3--horizontal .preview-canvas-wrap {
  min-height: 0;
  padding: 20px 28px 28px;
}
#previewCanvas[data-preview-aspect="horizontal"],
#step3.step3--horizontal #previewCanvas {
  width: 100%;
  max-width: 100%;
  max-height: min(56vh, 520px);
  height: auto;
  object-fit: contain;
}
#step3.step3--horizontal .card:first-child .card-body {
  padding: 16px 20px 20px !important;
}
.preview-panel { display: flex; flex-direction: column; gap: 16px; }
.panel-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.panel-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.panel-card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.download-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
}
.download-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.download-btn .icon { font-size: 1.1rem; }
.download-btn .text-wrap { text-align: left; }
.download-btn .text-wrap small { display: block; font-size: 0.72rem; font-weight: 400; color: var(--text-muted); margin-top: 1px; }
.info-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.info-row .label { color: var(--text-muted); }
.info-row .value { font-weight: 600; color: var(--text); max-width: 160px; text-align: right; word-break: break-all; }
.loading-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ FIND PAGE ============ */
.find-page {
  min-height: 100vh;
  padding-top: var(--nav-h);
  background: var(--bg-light);
}
.find-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 60px 0;
  color: white;
  text-align: center;
}
.find-hero h1 { color: white; font-size: 2rem; margin-bottom: 10px; }
.find-hero p { color: rgba(255,255,255,0.8); font-size: 1rem; margin-bottom: 32px; }
.find-search-wrap {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}
.find-search-wrap .form-control {
  flex: 1;
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: white;
}
.find-search-wrap .form-control::placeholder { color: rgba(255,255,255,0.6); }
.find-search-wrap .form-control:focus {
  background: rgba(255,255,255,0.25);
  border-color: white;
  box-shadow: none;
}
.find-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.find-results { display: flex; flex-direction: column; gap: 16px; }
.result-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
  cursor: pointer;
}
.result-card:hover { border-color: var(--primary); box-shadow: var(--shadow-blue); transform: translateY(-2px); }
.result-qr {
  width: 80px; height: 80px;
  min-width: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-light);
  display: flex; align-items: center; justify-content: center;
}
.result-qr canvas { width: 70px !important; height: 70px !important; }
.result-info { flex: 1; }
.result-info .ssid { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.result-info .meta { font-size: 0.82rem; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.result-actions { display: flex; gap: 8px; flex-shrink: 0; position: relative; z-index: 2; }
.result-actions .btn { pointer-events: auto; }
.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 10px; }
.empty-state p { font-size: 0.92rem; color: var(--text-muted); }

/* ============ TOAST NOTIFICATION ============ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--dark);
  color: white;
  padding: 13px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  min-width: 260px;
  max-width: 340px;
}
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: #ef4444; }
@keyframes slideInRight {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ============ UTILITIES ============ */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.fw-700 { font-weight: 700; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .template-selector { grid-template-columns: repeat(2, 1fr); }
  .preview-layout { grid-template-columns: 1fr; }
  .preview-canvas-wrap { padding: 20px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-logo {
    font-size: 1.2rem;
  }
  .nav-logo .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1.35rem;
  }
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-content { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-mockup { width: 280px; max-width: 100%; }
  .hero-mockup-img { max-width: 280px; }
  .steps-row { grid-template-columns: 1fr; gap: 32px; }
  .steps-row::before { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .template-selector { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
  }
  .footer-bottom-tagline {
    display: none;
  }
  .footer-bottom-copy {
    width: 100%;
    align-items: center;
    gap: 6px;
  }
  .footer-bottom-brand,
  .footer-bottom-legal {
    display: block;
    width: 100%;
    line-height: 1.45;
  }
  .footer-bottom-legal {
    font-size: 0.72rem;
    letter-spacing: -0.01em;
  }
  .cta-banner {
    padding: 56px 0 64px;
  }
  .cta-banner h2 {
    font-size: clamp(1.65rem, 7.5vw, 2.1rem);
    margin-bottom: 14px;
    line-height: 1.28;
    -webkit-text-stroke: 2px rgba(0,0,0,0.65);
  }
  .cta-banner p {
    font-size: clamp(0.92rem, 3.8vw, 1.1rem);
    margin-bottom: 26px;
    line-height: 1.5;
    -webkit-text-stroke: 1px rgba(0,0,0,0.55);
  }
  .cta-banner .cta-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 0.95rem;
    padding: 14px 22px;
    border-width: 3px;
    border-radius: 999px;
    line-height: 1.35;
    white-space: normal;
    word-break: keep-all;
  }
  .find-search-wrap { flex-direction: column; }
}
@media (max-width: 480px) {
  .template-grid { grid-template-columns: 1fr; }
  .template-card-horizontal { grid-column: span 1; }
  .template-selector { grid-template-columns: 1fr 1fr; }
  .hero-mockup { width: 240px; }
  .hero-mockup-img { max-width: 240px; }
  .hero-stats { flex-wrap: wrap; gap: 18px; }
}

/* ============ MOBILE-FIRST OPTIMIZATION ============ */
/* 한국어 줄바꿈: 단어 단위로 (글자 하나씩 깨지는 것 방지) */
body { word-break: keep-all; overflow-wrap: break-word; }

/* 광고가 채워지지 않으면 빈 박스가 자리 차지하지 않게 접기 (구글 공식 방식) */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.site-ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none !important; }

@media (max-width: 768px) {
  /* iOS 사파리 입력칸 자동 확대 방지: 폼 글자는 반드시 16px 이상 */
  .form-control, .form-select,
  input[type="text"], input[type="password"], input[type="number"],
  input[type="search"], select, textarea {
    font-size: 16px;
  }

  /* 터치 타깃 확대 (최소 44px 권장) */
  .input-action { padding: 12px; right: 6px; }
  .modal-close { width: 44px; height: 44px; }

  /* 템플릿 카드 라벨: 이름·색상 설명을 세로 배치 (한 글자씩 깨지는 문제 해결) */
  .tpl-label { flex-direction: column; align-items: flex-start; gap: 3px; }
  .tpl-label small { margin-left: 0; white-space: normal; }
  .template-info { flex-direction: column; align-items: flex-start; gap: 3px; }
  .template-info h4 { font-size: 0.88rem; }

  /* 단계 이동 버튼: 세로로 쌓기 (취소 버튼 잘림 해결, 주 버튼이 위) */
  .card-footer { flex-direction: column-reverse; align-items: stretch; }
  .card-footer .btn { width: 100%; }
  .modal-footer { flex-wrap: wrap; }
  .modal-footer .btn { flex: 1 1 auto; }

  /* 내 QR 찾기: 결과 카드 세로 배치 (버튼 화면 밖 잘림 해결) */
  .result-card { flex-wrap: wrap; padding: 16px; }
  .result-info { flex: 1 1 calc(100% - 100px); min-width: 0; }
  .result-actions { width: 100%; }
  .result-actions .btn { flex: 1; min-height: 44px; }

  /* 토스트 알림: 화면 폭 안에서 하단 전체 사용 */
  .toast-container { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .toast { min-width: 0; max-width: none; }
}

/* ============ PRINT STYLES ============ */
@media print {
  .nav, .footer, .hero, .features-section,
  .how-it-works, .template-gallery, .faq-section,
  .cta-banner, .create-hero, .stepper,
  .card-footer, .preview-panel, .btn,
  .toast-container { display: none !important; }
  body { background: white; }
  .preview-canvas-wrap {
    background: none;
    padding: 0;
    display: block;
  }
  #previewCanvas {
    width: 100% !important;
    height: auto !important;
    box-shadow: none;
    max-width: 100%;
  }
  #step3.step3--horizontal #previewCanvas {
    max-height: none !important;
  }
  @page { margin: 0; size: A4; }
}
