/* ════════════════════════════════════════════ 
   세대교류프로젝트 — Design System
   심플·모던·따뜻한 느낌 유지
════════════════════════════════════════════ */
:root {
  --primary:       #7c3aed;
  --primary-light: #8b5cf6;
  --primary-hover: #6d28d9;
  --primary-bg:    #f5f3ff;
  --primary-dim:   #ede9fe;
  --primary-shadow:#5b21b6;

  --text-main: #1e293b;
  --text-sub:  #64748b;
  --text-muted:#94a3b8;

  --bg:        #f8fafc;
  --surface:   #ffffff;
  --border:    #e2e8f0;
  --border-soft:#f1f5f9;

  --success: #10b981;
  --danger:  #ef4444;
  --warning: #f59e0b;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 32px rgba(0,0,0,0.08);
}

/* ── 기본 ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Pretendard', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  margin: 0;
  padding: 72px 16px 60px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  line-height: 1.6;
}

.material-symbols-rounded {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: inherit; vertical-align: middle;
}
.icon-header { display: flex; align-items: center; gap: 8px; }
.title-icon { color: var(--primary); font-size: 1.5rem; }
.icon-align { font-size: 1.2rem; margin-right: 4px; }
.comment-title-icon, .explanation-icon { color: var(--primary); font-size: 1.3rem; }
.status-icon { font-size: 1.6rem; }
.status-icon.correct { color: var(--success); }
.status-icon.incorrect { color: var(--danger); }
#explanation-title.correct { color: var(--success); }
#explanation-title.incorrect { color: var(--danger); }

/* ── 헤더 ── */
.main-header {
  position: fixed; top: 0; left: 0; width: 100%; height: 60px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.logo-btn {
  display: flex; align-items: center; gap: 7px;
  background: none; border: none;
  font-weight: 800; color: var(--primary);
  font-size: 1.05rem; cursor: pointer;
  letter-spacing: -0.3px;
  font-family: inherit;
}

/* ── 컨테이너 ── */
.container {
  background: var(--surface);
  width: 100%; max-width: 660px;
  padding: 2rem 1.5rem;
  position: relative;
  border-radius: 0;
}

/* ── 타이포 ── */
h1 {
  font-size: 2.4rem; font-weight: 900;
  line-height: 1.2; margin: 16px 0 12px;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
h2 {
  font-size: 1.35rem; font-weight: 700;
  line-height: 1.45; margin-bottom: 20px;
  word-break: keep-all; color: var(--text-main);
}
.subtitle {
  color: var(--text-sub); font-size: 1rem;
  line-height: 1.65; margin-bottom: 28px;
}

/* ── 배지 ── */
.badge {
  display: inline-block;
  background: var(--primary-dim);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem; font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}

/* ── 시작 화면 퀴즈 카드 ── */
.quiz-select-container { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }

.quiz-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.quiz-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), #a78bfa);
  opacity: 0;
  transition: opacity 0.25s;
}
.quiz-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow), 0 0 0 3px var(--primary-dim);
  transform: translateY(-2px);
}
.quiz-card:hover::before { opacity: 1; }
.quiz-card h3 { margin: 10px 0 6px; font-size: 1.15rem; font-weight: 700; }
.quiz-card p { color: var(--text-sub); font-size: 0.88rem; margin-bottom: 14px; line-height: 1.5; }
.quiz-card-icon { font-size: 2.8rem; margin-bottom: 4px; }

/* ── 차트 ── */
.chart-container {
  width: 100%; max-width: 380px; margin: 0 auto;
  background: var(--surface); padding: 16px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ── 버튼 ── */
.action-btn {
  width: 100%; padding: 17px;
  font-size: 1.05rem; font-weight: 700;
  border-radius: var(--radius); border: none;
  cursor: pointer; transition: all 0.12s;
  box-sizing: border-box; font-family: inherit;
  letter-spacing: -0.2px;
}
.primary-btn {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  box-shadow: 0 6px 0 var(--primary-shadow), var(--shadow-sm);
}
.primary-btn:hover { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); }
.primary-btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--primary-shadow); }

.secondary-btn {
  background: var(--border-soft);
  color: var(--text-main);
  box-shadow: 0 6px 0 #cbd5e1;
}
.secondary-btn:hover { background: #e8edf4; }
.secondary-btn:active { transform: translateY(6px); box-shadow: none; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* ── 서브 네비 ── */
.sub-nav-container { display: flex; gap: 8px; margin-top: 16px; }
.sub-nav-btn {
  flex: 1; background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-sub);
  font-size: 0.88rem; font-weight: 600;
  padding: 11px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.sub-nav-btn:hover {
  background: var(--primary-dim);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* ── 진행 바 ── */
.progress-wrapper { margin-bottom: 24px; }
.progress-text {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; font-weight: 700; color: var(--text-sub); margin-bottom: 10px;
}
.progress-text span:last-child { color: var(--primary); }
.progress-container {
  background: var(--border); border-radius: 99px; height: 6px; overflow: hidden;
}
#progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: 99px; width: 0%;
  transition: width 0.45s cubic-bezier(0.4,0,0.2,1);
}

/* ── 선택지 ── */
.options-group { display: flex; flex-direction: column; gap: 10px; }
.options-group button {
  width: 100%; padding: 17px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  font-size: 1rem; font-weight: 500;
  color: var(--text-main); cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  word-break: keep-all; font-family: inherit;
  line-height: 1.5;
}
.options-group button:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 0 0 3px var(--primary-dim);
  transform: translateX(4px);
}
.options-group button:active { transform: translateX(4px) scale(0.99); }

/* ── 결과 카드 ── */
.character-card {
  background: linear-gradient(160deg, #fff 0%, var(--primary-bg) 100%);
  border: 1.5px solid var(--primary-dim);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem 2rem;
  text-align: center; margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.character-card::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #a78bfa, var(--primary), #6366f1);
}
#user-type-tag, #knowledge-type-tag {
  font-size: 0.85rem; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px;
}
.character-img { font-size: 5rem; margin: 20px 0 16px; line-height: 1; }
.knowledge-card .character-img { color: var(--primary); }
#character-name, #knowledge-score-text {
  font-size: 2.2rem; font-weight: 900;
  margin: 0; color: var(--text-main);
  letter-spacing: -1px;
}
.divider {
  width: 36px; height: 3px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  margin: 20px auto; border-radius: 99px;
}
#character-desc, #knowledge-eval-text {
  font-size: 1rem; line-height: 1.7;
  color: var(--text-sub); word-break: keep-all;
  max-width: 480px; margin: 0 auto;
}

/* ── 방명록 ── */
.comment-section {
  background: var(--border-soft); padding: 20px;
  border-radius: var(--radius); border: 1px solid var(--border);
  margin-top: 32px;
}
.comment-section h3 { font-size: 1rem; margin-top: 0; font-weight: 700; }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 11px 13px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.93rem; background: var(--surface);
  transition: border-color 0.2s; outline: none;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--primary-light); }
.comment-form textarea { resize: vertical; min-height: 80px; }
.comment-form button {
  background: var(--primary); color: white; border: none; padding: 11px;
  border-radius: var(--radius-sm); font-weight: 700; cursor: pointer;
  font-family: inherit; transition: background 0.2s;
}
.comment-form button:hover { background: var(--primary-hover); }
.comment-item {
  background: white; padding: 14px; border-radius: var(--radius-sm);
  margin-bottom: 8px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.comment-meta {
  display: flex; justify-content: space-between;
  margin-bottom: 6px; font-size: 0.82rem; color: var(--text-muted);
}
.comment-meta strong { color: var(--text-main); font-size: 0.92rem; }
.comment-text { margin: 0; font-size: 0.93rem; line-height: 1.5; word-break: break-all; }

.hidden { display: none !important; }

/* ── 해설 박스 ── */
.evidence-box {
  background: var(--border-soft); padding: 20px;
  border-radius: var(--radius); border: 1px solid var(--border); margin: 20px 0;
}
.evidence-box h3 { font-size: 1rem; margin-top: 0; margin-bottom: 12px; font-weight: 700; }
#explanation-desc {
  font-size: 0.97rem; line-height: 1.7; margin-bottom: 16px;
  word-break: keep-all; color: var(--text-main);
}
.source-link-container { position: relative; display: inline-block; }
.source-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; background: var(--primary-dim);
  border-radius: var(--radius-sm); font-size: 0.88rem;
  cursor: pointer; color: var(--primary); font-weight: 600;
  transition: background 0.2s;
}
.source-trigger:hover { background: #ddd6fe; }
.source-tooltip {
  position: absolute; top: 100%; left: 0; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px;
  box-shadow: var(--shadow-lg); min-width: 260px; z-index: 100;
  visibility: hidden; opacity: 0; transform: translateY(-6px);
  transition: visibility 0.2s, opacity 0.2s, transform 0.2s;
  display: flex; flex-direction: column; gap: 4px;
}
.source-link-container:hover .source-tooltip { visibility: visible; opacity: 1; transform: translateY(0); }
.source-tooltip a {
  color: var(--primary); text-decoration: none; font-size: 0.88rem;
  padding: 6px 8px; border-radius: 6px; word-break: keep-all; transition: background 0.2s;
}
.source-tooltip a:hover { background: var(--border-soft); }

/* ── 정보 카드 (유형 보기) ── */
.info-card-list { display: flex; flex-direction: column; gap: 14px; }
.info-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: all 0.2s; box-shadow: var(--shadow-sm);
}
.info-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-dim); }
.info-card h3 { margin-top: 0; margin-bottom: 8px; font-size: 1.1rem; font-weight: 700; }
.info-card p { margin: 0; font-size: 0.93rem; line-height: 1.65; color: var(--text-sub); word-break: keep-all; }

/* ── 연구 배경 카드 ── */
.research-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: all 0.25s;
}
.research-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.research-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
}
.research-card-title {
  font-size: 1.25rem; font-weight: 800;
  color: var(--text-main); margin: 0 0 8px;
  letter-spacing: -0.5px;
}
.research-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.research-tag {
  background: var(--primary-dim); color: var(--primary);
  font-size: 0.75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.research-card-desc {
  font-size: 0.96rem; line-height: 1.7;
  color: var(--text-sub); margin-bottom: 18px; word-break: keep-all;
}
.research-boxes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px;
}
.research-box {
  background: var(--border-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
}
.research-box-title {
  font-size: 0.85rem; font-weight: 700;
  color: var(--primary); margin-bottom: 6px;
}
.research-box-desc { font-size: 0.87rem; line-height: 1.55; color: var(--text-sub); word-break: keep-all; }
.research-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.research-stat {
  background: linear-gradient(135deg, var(--primary-dim), #ddd6fe);
  border-radius: var(--radius-sm); padding: 14px 18px; text-align: center; min-width: 90px;
}
.research-stat-num { font-size: 1.7rem; font-weight: 900; color: var(--primary); line-height: 1; }
.research-stat-label { font-size: 0.76rem; color: var(--text-sub); margin-top: 4px; word-break: keep-all; }
.research-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.research-source-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; background: var(--border-soft);
  border-radius: 8px; color: var(--primary);
  text-decoration: none; font-size: 0.8rem; font-weight: 600;
  transition: background 0.2s;
}
.research-source-link:hover { background: var(--primary-dim); }

/* ── 빈 상태 ── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .material-symbols-rounded { font-size: 3rem; display: block; margin-bottom: 12px; color: var(--border); }
.empty-state p { font-size: 0.95rem; margin: 0; }

/* ════════════════════════════════════════════
   관리자 전용
════════════════════════════════════════════ */
.admin-tab-bar {
  display: flex; gap: 2px; flex-wrap: wrap;
  margin: 20px 0 0; border-bottom: 2px solid var(--border);
}
.admin-tab {
  display: flex; align-items: center; gap: 5px; padding: 9px 13px;
  background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -2px;
  font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text-sub);
  cursor: pointer; transition: all 0.2s; border-radius: 8px 8px 0 0;
}
.admin-tab:hover { color: var(--primary); background: var(--primary-bg); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--primary-bg); }
.admin-tab .material-symbols-rounded { font-size: 1rem; }

.admin-panel { padding-top: 20px; }
.admin-panel-desc {
  font-size: 0.87rem; color: var(--text-sub); background: var(--border-soft);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 12px; line-height: 1.55; word-break: keep-all;
}
.paste-format-box {
  background: #1e293b; border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px; overflow-x: auto;
}
.paste-format-box code {
  color: #a5f3fc; font-size: 0.78rem;
  font-family: 'Courier New', monospace; white-space: nowrap;
}
.paste-input {
  width: 100%; min-height: 80px; padding: 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.92rem; resize: vertical;
  box-sizing: border-box; outline: none; transition: border-color 0.2s; background: var(--surface);
}
.paste-input:focus { border-color: var(--primary-light); }
.list-divider { border: none; border-top: 1.5px dashed var(--border); margin: 20px 0; }
.admin-add-btn { background: var(--danger); color: white; box-shadow: 0 5px 0 #b91c1c; font-size: 0.97rem; padding: 14px; }
.admin-add-btn:active { transform: translateY(5px); box-shadow: none; }

.admin-quiz-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 8px; transition: box-shadow 0.2s;
}
.admin-quiz-card:hover { box-shadow: var(--shadow); }
.admin-quiz-card-header { display: flex; align-items: flex-start; gap: 10px; }
.admin-quiz-card-body { flex: 1; min-width: 0; }
.admin-quiz-card-body .badge { margin-bottom: 5px; font-size: 0.72rem; padding: 3px 9px; }
.admin-quiz-card-body h4 {
  margin: 0; font-size: 0.93rem; color: var(--text-main); line-height: 1.45; word-break: keep-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.admin-quiz-card-actions { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.edit-btn {
  padding: 6px 11px; border: none; border-radius: 7px; font-weight: 600; cursor: pointer;
  font-size: 0.82rem; font-family: inherit; background: #e0e7ff; color: #4f46e5; transition: background 0.2s;
}
.edit-btn:hover { background: #c7d2fe; }
.delete-btn {
  padding: 6px 11px; border: none; border-radius: 7px; font-weight: 600; cursor: pointer;
  font-size: 0.82rem; font-family: inherit; background: #fee2e2; color: var(--danger); transition: background 0.2s;
}
.delete-btn:hover { background: #fecaca; }

.admin-form-body { display: flex; flex-direction: column; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 0.85rem; font-weight: 700; color: var(--primary); }
.form-group input, .form-group textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 0.93rem;
  color: var(--text-main); background: var(--surface);
  box-sizing: border-box; transition: border-color 0.2s; outline: none; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary-light); }
.admin-save-btn { background: var(--danger); color: white; box-shadow: 0 6px 0 #b91c1c; }
.admin-save-btn:active { transform: translateY(6px); box-shadow: none; }

.dynamic-row { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 8px; }
.dynamic-row input, .dynamic-row textarea {
  flex: 1; padding: 9px 11px; border: 1.5px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: 0.9rem;
  outline: none; transition: border-color 0.2s; box-sizing: border-box; resize: vertical; background: var(--surface);
}
.dynamic-row input:focus, .dynamic-row textarea:focus { border-color: var(--primary-light); }
.dynamic-row-remove {
  width: 32px; height: 32px; border-radius: 50%; background: #fee2e2; color: var(--danger);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 6px;
}
.dynamic-row-remove:hover { background: #fecaca; }
.add-source-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px;
  background: var(--primary-dim); color: var(--primary); border: none; border-radius: 8px;
  font-family: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; margin-top: 4px;
}
.add-source-btn:hover { background: #ddd6fe; }
.add-source-btn .material-symbols-rounded { font-size: 1rem; }

.type-admin-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px;
}
.type-admin-icon { font-size: 2rem; flex-shrink: 0; }
.type-admin-body { flex: 1; }
.type-admin-body strong { font-size: 0.97rem; display: block; margin-bottom: 2px; }
.type-admin-body p {
  font-size: 0.83rem; color: var(--text-sub); margin: 0; word-break: keep-all;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

.img-method-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.img-method-tab {
  flex: 1; padding: 9px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--border-soft); font-family: inherit; font-size: 0.86rem; font-weight: 600;
  color: var(--text-sub); cursor: pointer; transition: all 0.2s;
}
.img-method-tab.active { background: var(--primary-dim); border-color: var(--primary-light); color: var(--primary); }
.file-upload-label {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 24px; border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--border-soft); cursor: pointer; text-align: center;
  font-size: 0.88rem; color: var(--text-sub); font-weight: 600; transition: all 0.2s;
}
.file-upload-label:hover { border-color: var(--primary-light); background: var(--primary-bg); color: var(--primary); }
.img-url-preview-btn {
  margin-top: 8px; padding: 9px 16px; background: var(--primary-dim); color: var(--primary);
  border: none; border-radius: 8px; font-family: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.img-url-preview-btn:hover { background: #ddd6fe; }
.img-preview-box { position: relative; margin-top: 10px; display: inline-block; max-width: 100%; }
.img-preview-box img { max-width: 100%; border-radius: var(--radius-sm); border: 1.5px solid var(--border); display: block; }
.img-remove-btn {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: white; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.img-remove-btn:hover { background: rgba(0,0,0,0.75); }
.upload-progress-track { background: var(--border); border-radius: 99px; height: 6px; overflow: hidden; }
.upload-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary-light), var(--primary)); border-radius: 99px; width: 0%; transition: width 0.25s; }
.upload-progress-text { font-size: 0.8rem; color: var(--text-sub); margin: 4px 0 0; }

/* ════════════════════════════════════════════
   AI 어시스턴트
════════════════════════════════════════════ */
.ai-assistant-box {
  background: linear-gradient(135deg, var(--primary-bg), #f0f9ff);
  border: 1.5px solid #ddd6fe; border-radius: var(--radius); padding: 18px; margin-bottom: 4px;
}
.ai-assistant-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ai-assistant-header strong { font-size: 0.97rem; color: var(--primary-hover); }
.ai-assistant-desc { font-size: 0.8rem; color: var(--text-sub); flex: 1; }
.ai-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ai-chip {
  padding: 5px 12px; background: var(--primary-dim); color: #6d28d9;
  border: none; border-radius: 20px; font-family: inherit;
  font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.ai-chip:hover { background: #ddd6fe; transform: translateY(-1px); }
.ai-input {
  width: 100%; min-height: 88px; padding: 12px 14px;
  border: 1.5px solid #ddd6fe; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.92rem; resize: vertical;
  box-sizing: border-box; outline: none; background: rgba(255,255,255,0.8);
  transition: border-color 0.2s;
}
.ai-input:focus { border-color: var(--primary-light); background: white; }
.ai-generate-btn {
  width: 100%; margin-top: 10px; padding: 13px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white; border: none; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.97rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 0 var(--primary-shadow); transition: all 0.12s;
}
.ai-generate-btn:hover { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); }
.ai-generate-btn:active { transform: translateY(4px); box-shadow: none; }
.ai-generate-btn:disabled { background: var(--text-muted); box-shadow: 0 4px 0 #94a3b8; cursor: not-allowed; }
.ai-spinner {
  width: 15px; height: 15px; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white; border-radius: 50%; display: inline-block;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-preview-container {
  margin-top: 14px; border: 1.5px solid #ddd6fe;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--surface);
}
.ai-preview-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--primary-dim); border-bottom: 1px solid #ddd6fe;
}
.ai-preview-count { font-size: 0.85rem; font-weight: 700; color: var(--primary-hover); }
.ai-preview-save-btn {
  display: flex; align-items: center; gap: 4px; padding: 6px 12px;
  background: var(--primary); color: white; border: none; border-radius: 8px;
  font-family: inherit; font-size: 0.83rem; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.ai-preview-save-btn:hover { background: var(--primary-hover); }
.ai-preview-clear-btn {
  width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,0.08);
  color: var(--primary-hover); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ai-preview-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ai-preview-card {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; background: var(--border-soft); opacity: 0.5; transition: all 0.2s;
}
.ai-preview-card.selected { border-color: var(--primary-light); background: var(--primary-bg); opacity: 1; }
.ai-preview-card-header { display: flex; gap: 10px; align-items: flex-start; }
.ai-preview-checkbox { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }
.ai-preview-card-body { flex: 1; min-width: 0; }
.ai-preview-question { font-size: 0.93rem; font-weight: 600; color: var(--text-main); margin-bottom: 8px; word-break: keep-all; }
.ai-preview-options { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.ai-preview-option { font-size: 0.83rem; color: var(--text-sub); padding: 4px 8px; background: var(--surface); border-radius: 6px; word-break: keep-all; }
.ai-preview-option strong { color: var(--primary); margin-right: 4px; }
.ai-preview-evidence { font-size: 0.81rem; color: var(--text-sub); line-height: 1.5; word-break: keep-all; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
.paste-section { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.paste-section summary {
  padding: 10px 14px; font-size: 0.86rem; font-weight: 600; color: var(--text-sub);
  cursor: pointer; background: var(--border-soft); list-style: none;
  display: flex; align-items: center; gap: 6px; user-select: none;
}
.paste-section summary::-webkit-details-marker { display: none; }
.paste-section summary::before { content: "▶"; font-size: 0.65rem; transition: transform 0.2s; }
.paste-section[open] summary::before { transform: rotate(90deg); }
.paste-section > *:not(summary) { padding: 0 14px 14px; }
/* ── 관리자 정보 박스 ── */
.admin-info-box {
  display: flex; flex-direction: column; gap: 12px; margin-top: 16px;
}
.admin-info-item {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow-sm);
}
.admin-info-item .material-symbols-rounded {
  font-size: 1.8rem; color: var(--primary); flex-shrink: 0; margin-top: 2px;
}
.admin-info-item strong { display: block; font-size: 0.97rem; margin-bottom: 4px; }
.admin-info-item p { margin: 0; font-size: 0.85rem; color: var(--text-sub); font-family: 'Courier New', monospace; word-break: break-all; }

/* ── 헤더 타이틀 ── */
.header-title { margin-bottom: 24px; }
.header-title h2 { margin-bottom: 6px; }
/* ── 연구 배경 SVG 차트 영역 ── */
.research-svg {
  margin: 0 -8px 18px;
  padding: 14px;
  background: linear-gradient(135deg, #faf5ff 0%, #f0f9ff 100%);
  border: 1px solid var(--primary-dim);
  border-radius: var(--radius-sm);
  display: flex; justify-content: center; align-items: center;
}
.research-svg svg { width: 100%; max-width: 420px; height: auto; }

/* 단일 박스일 때 grid 1열로 자동 조정 */
@media (max-width: 480px) {
  .research-boxes { grid-template-columns: 1fr; }
}
/* ════════════════════════════════════════════
   연구 배경 화면 — 와이드 레이아웃
════════════════════════════════════════════ */
main.container:has(#research-screen:not(.hidden)),
main.container:has(#tendency-screen:not(.hidden)) {
  max-width: 1040px;
  transition: max-width 0.3s ease;
}

/* 연구 배경 박스 그리드: 데스크탑 3열 / 태블릿 2열 / 모바일 1열 */
#research-screen .research-boxes {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 820px) {
  #research-screen .research-boxes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  #research-screen .research-boxes { grid-template-columns: 1fr; }
}
#research-screen .research-card { padding: 32px 28px; }
#research-screen .research-card-desc { font-size: 1rem; max-width: 800px; }
#research-screen .research-stats { gap: 14px; }
#research-screen .research-stat { padding: 16px 22px; min-width: 110px; }
#research-screen .research-stat-num { font-size: 1.9rem; }

/* ════════════════════════════════════════════
   유형 보기 화면 — 풍부한 카드 레이아웃
════════════════════════════════════════════ */
.type-detail-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
  margin-bottom: 18px;
}
.type-detail-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.type-detail-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--type-color);
}
.type-detail-card::after {
  content: "";
  position: absolute; top: 0; right: 0;
  width: 140px; height: 140px;
  background: var(--type-color);
  opacity: 0.05;
  border-radius: 0 0 0 140px;
  pointer-events: none;
}

.type-detail-header {
  display: flex; align-items: flex-start; gap: 18px;
  margin-bottom: 20px;
  position: relative; z-index: 1;
}
.type-detail-icon {
  font-size: 3rem !important;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--type-color) 12%, transparent);
  padding: 14px;
  border-radius: 18px;
  width: 70px; height: 70px;
  display: inline-flex; align-items: center; justify-content: center;
}
.type-detail-titles { flex: 1; min-width: 0; }
.type-key {
  font-size: 0.78rem; font-weight: 700;
  color: var(--type-color);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.type-detail-name {
  margin: 0 0 6px;
  font-size: 1.5rem; font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}
.type-motto {
  margin: 0;
  font-size: 0.95rem;
  color: var(--type-color);
  font-style: italic;
  font-weight: 600;
}

.type-detail-desc {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-sub);
  margin: 0 0 24px;
  word-break: keep-all;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--border);
}

.type-section { margin-bottom: 24px; }
.type-section:last-child { margin-bottom: 0; }
.type-section-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-main);
  margin: 0 0 12px;
}
.type-section-title .material-symbols-rounded {
  font-size: 1.1rem;
  color: var(--type-color);
}

.type-box-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 820px) {
  .type-box-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .type-box-grid { grid-template-columns: 1fr; }
}

.type-box {
  background: color-mix(in srgb, var(--type-color) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--type-color) 22%, transparent);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.type-box-caution {
  background: var(--border-soft);
  border: 1px solid var(--border);
}
.type-box-title {
  font-size: 0.88rem; font-weight: 700;
  color: var(--type-color);
  margin-bottom: 6px;
}
.type-box-caution .type-box-title { color: var(--text-main); }
.type-box-desc {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-sub);
  word-break: keep-all;
}

.type-behavior-list {
  list-style: none;
  padding: 0; margin: 0;
}
.type-behavior-list li {
  position: relative;
  padding: 8px 0 8px 24px;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--text-sub);
  word-break: keep-all;
  border-bottom: 1px dashed var(--border-soft);
}
.type-behavior-list li:last-child { border-bottom: none; }
.type-behavior-list li::before {
  content: "→";
  position: absolute;
  left: 4px; top: 7px;
  font-weight: 700;
  color: var(--type-color);
}

.type-working-with {
  background: color-mix(in srgb, var(--type-color) 6%, var(--surface));
  border-left: 3px solid var(--type-color);
  padding: 16px 18px;
  border-radius: 10px;
}
.type-working-with p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--text-sub);
  word-break: keep-all;
}
/* ════════════════════════════════════════════
   유형 보기 — 캐러셀 (모바일) / 세로 (데스크탑)
════════════════════════════════════════════ */
.type-carousel-wrapper {
  position: relative;
  margin-bottom: 8px;
}
.type-carousel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: visible;
}
.type-carousel .type-detail-card { margin-bottom: 0; }

/* 데스크탑: nav-row / dots / arrows 모두 숨김 (세로 스크롤이라 불필요) */
.type-nav-row { display: none; }

/* ════════════ 모바일: 캐러셀 모드 ════════════ */
@media (max-width: 720px) {
  /* 캐러셀이 viewport 풀폭을 차지하도록 */
  .type-carousel {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
    /* body padding 무시하고 viewport 풀폭 */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    padding: 4px 14px 10px;
    scroll-padding-left: 14px;
  }
  .type-carousel::-webkit-scrollbar { display: none; }

  /* 카드는 viewport 너비에서 좌우 패딩만 빼고 거의 풀폭 */
  .type-carousel .type-detail-card {
    flex: 0 0 calc(100vw - 28px);
    scroll-snap-align: start;
    margin-right: 14px;
    padding: 24px 20px;
  }
  .type-carousel .type-detail-card:last-child { margin-right: 0; }

  /* 박스 그리드는 1열 */
  .type-carousel .type-box-grid {
    grid-template-columns: 1fr !important;
  }

  /* 네비게이션 행 (화살표 + 도트 + 화살표) */
  .type-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    margin-bottom: 4px;
  }

  /* 좌우 화살표 버튼 */
  .type-nav-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    padding: 0;
  }
  .type-nav-btn .material-symbols-rounded {
    font-size: 1.6rem;
  }
  .type-nav-btn:hover:not(:disabled),
  .type-nav-btn:active:not(:disabled) {
    background: var(--primary-bg);
    border-color: var(--primary-light);
    color: var(--primary);
  }
  .type-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
  }

  /* 도트 인디케이터 */
  .type-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
  }
  .type-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-sub);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .type-dot.active {
    background: var(--type-color);
    border-color: var(--type-color);
    color: white;
    transform: scale(1.1);
  }

  /* 카드 헤더 모바일 조정 */
  .type-carousel .type-detail-icon {
    font-size: 2.4rem !important;
    width: 56px;
    height: 56px;
    padding: 10px;
  }
  .type-carousel .type-detail-name {
    font-size: 1.3rem;
  }
  .type-carousel .type-motto {
    font-size: 0.88rem;
  }
}

/* ════════════════════════════════════════════
   연구 배경 — 상단 점프 메뉴
════════════════════════════════════════════ */
.research-jump-nav {
  position: sticky;
  top: 60px; /* 헤더 높이 */
  z-index: 50;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 0;
  margin: 0 -16px 18px;
  padding-left: 16px;
  padding-right: 16px;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.research-jump-nav::-webkit-scrollbar { display: none; }

.research-jump-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.research-jump-chip:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}
.research-jump-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

/* 연구 카드 컨테이너에 약간의 여백 */
.research-cards-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
  /* 점프 스크롤 시 카드가 sticky nav 뒤로 가는 것 방지 */
  scroll-margin-top: 150px;
}
.research-card {
  scroll-margin-top: 150px;
}

/* 모바일에서 nav 텍스트 약간 작게 + 카드 패딩 줄이기 */
@media (max-width: 720px) {
  .research-jump-chip {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
  #research-screen .research-card {
    padding: 22px 18px;
  }
  #research-screen .research-card-title {
    font-size: 1.1rem;
  }
  #research-screen .research-card-desc {
    font-size: 0.92rem;
    line-height: 1.65;
  }
  /* 박스 그리드 1열 (모바일) */
  #research-screen .research-boxes {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  #research-screen .research-stat {
    padding: 12px 16px;
    min-width: 90px;
  }
  #research-screen .research-stat-num {
    font-size: 1.5rem;
  }
}

/* ════════════════════════════════════════════
   모바일 풀폭 — 모든 요소를 화면에 가깝게
════════════════════════════════════════════ */
@media (max-width: 720px) {
  /* body 좌우 패딩 최소화 */
  body {
    padding-left: 6px;
    padding-right: 6px;
  }
  /* 컨테이너 내부 패딩도 줄여서 카드가 화면에 더 닿게 */
  .container {
    padding: 1.5rem 0.6rem;
  }

  /* 시작 화면 퀴즈 카드 */
  .quiz-card { padding: 22px 16px; }

  /* 결과 카드 패딩 조정 */
  .character-card { padding: 2.4rem 1rem 1.6rem; }

  /* 연구 배경 카드도 좌우 여유 있게 */
  #research-screen .research-card {
    padding: 22px 16px;
  }

  /* 방명록 섹션 */
  .comment-section { padding: 16px 14px; }

  /* 옵션 버튼(선택지) 풀폭 가깝게 */
  .options-group button { padding: 16px 16px; }

  /* h1·h2 폰트 약간 키워서 시원하게 */
  h1 { font-size: 2.1rem; letter-spacing: -1px; }
  h2 { font-size: 1.25rem; }

  /* 점프 메뉴 좌우 여백 재조정 (body padding 변경 반영) */
  .research-jump-nav {
    margin-left: -6px;
    margin-right: -6px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* 더 작은 화면(좁은 폰)에서도 동일하게 적용 */
@media (max-width: 400px) {
  body {
    padding-left: 4px;
    padding-right: 4px;
  }
  .container {
    padding: 1.4rem 0.5rem;
  }
}
/* ════════════════════════════════════════════
   시작 페이지 — 프로젝트 소개 메시지
════════════════════════════════════════════ */
.intro-message {
  margin: 24px 0 28px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #faf5ff 0%, #f0f9ff 100%);
  border: 1px solid var(--primary-dim);
  border-radius: var(--radius-lg);
  text-align: left;
}
.intro-message p {
  margin: 0 0 12px;
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-sub);
  word-break: keep-all;
}
.intro-message p:last-child { margin-bottom: 0; }
.intro-message strong {
  color: var(--primary);
  font-weight: 700;
}

/* ════════════════════════════════════════════
   유형 상세 — 이론적 배경 박스
════════════════════════════════════════════ */
.type-theory {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: -10px 0 22px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--type-color) 5%, var(--surface));
  border-left: 3px solid var(--type-color);
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-sub);
  word-break: keep-all;
}
.type-theory > span:first-child {
  flex-shrink: 0;
  margin-top: 1px;
}

@media (max-width: 720px) {
  .intro-message {
    padding: 18px 16px;
    margin: 18px 0 22px;
  }
  .intro-message p {
    font-size: 0.9rem;
    line-height: 1.7;
  }
  .type-theory {
    font-size: 0.82rem;
    padding: 10px 12px;
  }
}

/* ════════════════════════════════════════════
   결과창 보강 — 모토 · 강점 미리보기 · 카테고리 강점
════════════════════════════════════════════ */
.result-extra {
  margin: 20px 0 12px;
  text-align: left;
}
.result-extra:empty {
  display: none;
}

.result-motto {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: rgba(124, 58, 237, 0.06);
  border-left: 3px solid var(--primary, #7c3aed);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.5;
  word-break: keep-all;
}
.result-motto .material-symbols-rounded {
  font-size: 1.05rem;
  opacity: 0.7;
  flex-shrink: 0;
}

.result-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.result-preview-item {
  padding: 12px 14px;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  word-break: keep-all;
}
.result-preview-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: var(--text-main, #1e293b);
}
.result-preview-item p {
  margin: 0;
  color: var(--text-sub, #64748b);
  font-size: 0.82rem;
}

.action-btn.ghost-btn {
  background: transparent;
  color: var(--text-sub, #64748b);
  border: 1px solid var(--border, #e2e8f0);
}
.action-btn.ghost-btn:hover {
  background: var(--surface, #f8fafc);
  color: var(--text-main, #1e293b);
}

@media (max-width: 720px) {
  .result-preview-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .result-motto {
    font-size: 0.88rem;
    padding: 10px 14px;
  }
  .result-preview-item {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
} 