/*
 * 바이브코더 루피 - 글로벌 스타일시트
 * 레트로 게임 + 브루탈리즘 디자인 시스템
 */

/* ===== 모바일 하단 네비 ===== */
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 9px;
  color: #9B8E7E;
  padding: 4px 0;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-item:active {
  color: #2C2417;
}
.mobile-nav-item.is-active {
  color: #2C2417;
}

/* ===== 모바일 최적화 ===== */
@media (max-width: 639px) {
  /* 터치 타겟 최소 44px */
  .game-btn, .vote-btn, button[type="submit"] {
    min-height: 44px;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* 카드 패딩 넉넉하게 */
  .game-card, .showcase-panel {
    border-width: 2px;
  }

  /* 원데이클래스 모바일 edge-to-edge */
  .guide-card,
  .topic-panel {
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
    border-width: 2px;
    margin-left: -20px;
    margin-right: -20px;
  }

  /* 블로그 모바일 최적화 */
  .prose-blog {
    font-size: 15.5px;
    line-height: 1.85;
    letter-spacing: -0.01em;
  }
  .prose-blog pre {
    font-size: 12px;
    padding: 14px 16px;
    border: none;
    overflow-x: auto;
    white-space: pre;
    word-wrap: normal;
  }
  .prose-blog h1 { font-size: 1.3em; }
  .prose-blog h2 { font-size: 1.15em; }
  .prose-blog blockquote {
    margin-left: -8px;
    margin-right: -8px;
  }
  .prose-blog table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 12px;
    scrollbar-width: thin;
    scrollbar-color: #D4A04A #E8E0D4;
  }
  .prose-blog table::-webkit-scrollbar { height: 5px; }
  .prose-blog table::-webkit-scrollbar-track { background: #E8E0D4; }
  .prose-blog table::-webkit-scrollbar-thumb { background: #D4A04A; border-radius: 3px; }

  /* 입력 필드 터치 최적화 */
  .game-input, input[type="text"], input[type="email"], textarea, select {
    font-size: 16px !important; /* iOS zoom 방지 */
    min-height: 44px;
  }

  /* 브루탈리즘 섀도우 모바일에서 줄이기 */
  .shadow-brutal { box-shadow: 3px 3px 0px #000; }
  .shadow-brutal-lg { box-shadow: 4px 4px 0px #000; }
}

/* ===== 스크롤바 항상 표시 (레이아웃 시프트 방지) ===== */
html {
  overflow-y: scroll;
}

/* ===== 댓글 액션 줄 (인스타 스타일) ===== */
.comment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}
.comment-actions form,
.comment-actions turbo-frame {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 0;
}
.comment-actions form button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.comment-like-count {
  font-family: 'Pretendard', sans-serif;
  font-size: 9px;
  color: #bbb;
  display: block;
  text-align: center;
  margin-top: 1px;
  line-height: 1;
}

/* ===== Focus Ring 제거 (글로벌) ===== */
*:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* ===== View Transitions ===== */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.2s;
  animation-timing-function: ease-in-out;
}

/* Turbo 네비게이션 후에는 입장 애니메이션 스킵 (View Transition이 대신 처리) */
body.turbo-visited .g-in,
body.turbo-visited .animate-fade-in-up,
body.turbo-visited .animate-fade-in,
body.turbo-visited .animate-pop-in {
  animation: none !important;
  opacity: 1 !important;
}

/* ===== 폰트 ===== */
.font-neodgm { font-family: 'NeoDunggeunmo', sans-serif; }
.font-galmuri { font-family: 'Galmuri11', sans-serif; }

/* ===== 브루탈리즘 그림자 ===== */
.shadow-brutal-sm { box-shadow: 2px 2px 0px #000; }
.shadow-brutal { box-shadow: 4px 4px 0px #000; }
.shadow-brutal-lg { box-shadow: 6px 6px 0px #000; }

/* ===== Hover 리프트 ===== */
.hover-lift {
  transition: all 0.2s ease-out;
}
.hover-lift:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #000;
}

/* ===== 입장 애니메이션 ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.85); }
  70% { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in-up { animation: fadeInUp 0.5s ease-out both; }
.animate-fade-in { animation: fadeIn 0.4s ease-out both; }
.animate-pop-in { animation: popIn 0.5s ease-out both; }
.animate-slide-left { animation: slideInLeft 0.4s ease-out both; }
.animate-slide-right { animation: slideInRight 0.4s ease-out both; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* ===== 게임 스타일 카드 ===== */
.game-card {
  background-color: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  transition: all 0.2s ease-out;
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
}

.game-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #E8D4A8, #B8D4C8, #D4A5A5, #E8B8A8);
}

/* ===== 페이지 헤더 ===== */
.page-hero {
  position: relative;
  padding: 3rem 0 2rem;
  text-align: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(184, 212, 200, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(232, 184, 168, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(212, 165, 165, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

/* ===== 투표 버튼 ===== */
.vote-btn {
  transition: all 0.15s ease-out;
  cursor: pointer;
}

.vote-btn:hover {
  transform: scale(1.1);
}

.vote-btn:active {
  transform: scale(0.95);
}

.vote-btn.voted {
  animation: votePop 0.3s ease-out;
}

@keyframes votePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ===== 순위 뱃지 ===== */
.rank-badge {
  position: relative;
}

.rank-badge.rank-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #2a1810;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: #2a1810;
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #CD7F32, #A0522D);
  color: #FFFFFF;
}

/* ===== 스크롤바 커스텀 ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-sub);
}

/* ===== 디자인 토큰 (Polished RPG) ===== */
:root {
  --bg-page: #FAF8F5;
  --bg-card: #fff;
  --border: #EAE4DC;
  --border-light: #F2EDE6;
  --text: #2C2417;
  --text-sub: #7A6E5E;
  --text-faint: #9B8E7E;
  --gold: #D4A04A;
  --gold-light: #FBF4E4;
  --gold-dark: #B8862E;
  --sage: #7BA88E;
  --coral: #C8836C;
  --nav-bg: #2C2417;
  --nav-text: #E8D4A8;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(44,36,23,0.05);
  --shadow-hover: 0 4px 16px rgba(44,36,23,0.08);
}

/* ===== 투표 버튼 (엄지척) ===== */
.vote-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 2px solid #000;
  background: transparent;
}
.vote-btn:hover {
  background: #FFF0F0;
  border-color: #000;
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0px #000;
}
.vote-btn:hover .vote-icon {
  color: #E8573A;
  transform: scale(1.1);
}
.vote-btn .vote-icon {
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #888;
  width: 14px;
  height: 14px;
}
.vote-btn .vote-label {
  font-size: 11px;
  color: #888;
  transition: color 0.2s ease;
}
.vote-btn.is-voted {
  background: #FFF0F0;
  border-color: #000;
}
.vote-btn.is-voted .vote-icon {
  color: #E8573A;
}
.vote-btn.is-voted .vote-label {
  color: #E8573A;
  font-weight: bold;
}
.vote-btn.is-voted:hover {
  border-color: #000;
}
.vote-btn.is-voted:hover .vote-icon {
  color: #D04A30;
  transform: scale(1.1);
}
.vote-btn.is-disabled {
  cursor: default;
  border-color: #000;
  opacity: 0.5;
}
.vote-btn.is-disabled:hover {
  background: transparent;
  border-color: #000;
  transform: none;
  box-shadow: none;
}
.vote-btn.is-disabled:hover .vote-icon {
  transform: none;
}

/* ===== 인풋 스타일 ===== */
.game-input {
  font-family: 'Galmuri11', sans-serif;
  background-color: #FFFFFF;
  border: 3px solid #000;
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.15s ease-out;
  outline: none;
  width: 100%;
}

.game-input:focus {
  box-shadow: 3px 3px 0px #000;
  transform: translate(-1px, -1px);
  border-color: #2a1810;
}

.game-input::placeholder {
  color: #aaa;
  font-family: 'Galmuri11', sans-serif;
}

/* ===== 게임 버튼 ===== */
.game-btn {
  font-family: 'NeoDunggeunmo', sans-serif;
  border: 3px solid #000;
  padding: 10px 24px;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease-out;
  box-shadow: 3px 3px 0px #000;
}

.game-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #000;
}

.game-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000;
}

.game-btn-primary { background-color: #B8D4C8; color: #000; }
.game-btn-secondary { background-color: #E8D4A8; color: #000; }
.game-btn-ghost {
  background: transparent;
  border: 2px solid #000;
  box-shadow: 2px 2px 0px #000;
  padding: 8px 16px;
  font-size: 12px;
}

.game-btn-ghost:hover {
  background-color: #FFFFFF;
  box-shadow: 3px 3px 0px #000;
}

/* ===== 상태 뱃지 ===== */
.status-badge {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 11px;
  padding: 3px 10px;
  border: 2px solid #000;
  display: inline-block;
  letter-spacing: 0.5px;
}

/* ===== 노이즈 텍스처 (서브 페이지용) ===== */
.noise-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  z-index: 0;
  background-image: url('data:image/svg+xml,%3Csvg viewBox=%220 0 256 256%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cfilter id=%22noise%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.9%22 numOctaves=%224%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23noise)%22/%3E%3C/svg%3E');
}

/* ===== 숫자 입력 화살표 제거 ===== */
.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.no-spinner {
  -moz-appearance: textfield;
}

/* ===== 텍스트 라인 클램프 ===== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 블로그 본문 (prose-blog) ===== */
/* ===== 원데이클래스 컴포넌트 ===== */
.guide-card {
  background: #FFFFFF;
  overflow: hidden;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
}
.guide-schedule {
  padding: 16px 16px 12px;
  background: #F7F5F0;
  border-bottom: 2px solid #000;
}
@media (min-width: 640px) {
  .guide-schedule { padding: 20px 24px 16px; }
}
.guide-vote-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #FFF0F0;
  color: #E8573A;
  border: 2px solid #000;
  white-space: nowrap;
  flex-shrink: 0;
}
.guide-progress {
  height: 4px;
  background: #E8E8E8;
  overflow: hidden;
  border: 2px solid #000;
}
.guide-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #E8573A, #F2994A);
  transition: width 0.8s ease;
}
.guide-info {
  padding: 14px 16px 16px;
}
@media (min-width: 640px) {
  .guide-info { padding: 16px 24px 20px; }
}
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guide-step {
  display: flex;
  align-items: center;
  gap: 10px;
}
.guide-step-num {
  width: 22px;
  height: 22px;
  background: #E8D4A8;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 10px;
  color: #000;
  flex-shrink: 0;
}

/* ── Live Dot ── */
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E8573A;
  position: relative;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(232,87,58,0.35);
  animation: live-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes live-ping {
  0% { transform: scale(1); opacity: 0.6; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

/* ── Topic Panel ── */
.topic-panel {
  background: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  overflow: hidden;
}
.panel-header {
  padding: 14px 16px;
  border-bottom: 2px solid #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
@media (min-width: 640px) {
  .panel-header { padding: 18px 22px; }
}
.topic-row {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  gap: 10px;
  transition: background 0.15s ease, transform 0.3s ease;
}
@media (min-width: 640px) {
  .topic-row { padding: 16px 22px; gap: 14px; }
}
.topic-row + .topic-row {
  border-top: 2px solid #000;
}
.topic-row:hover {
  background: #F7F5F0;
}
.topic-row.is-top {
  background: #FFF0F0;
  border-left: 4px solid #E8573A;
  padding-left: 10px;
}
@media (min-width: 640px) {
  .topic-row.is-top { padding-left: 18px; }
}
.topic-row.is-top:hover {
  background: #FFF0F0;
}
.panel-footer {
  padding: 12px 16px;
  border-top: 2px solid #000;
  background: #F7F5F0;
}
@media (min-width: 640px) {
  .panel-footer { padding: 14px 22px; }
}

/* ── Rank Number ── */
.rank-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1;
  transition: all 0.3s ease;
  border: 2px solid #000;
}
.rank-num.is-gold {
  background: #E8573A;
  color: #fff;
}
.rank-num.is-default {
  background: #666A86;
  color: #fff;
}

/* ── Last Winner ── */
.last-winner {
  background: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
}

/* ── Topic Animation ── */
@keyframes g-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.g-in { animation: g-rise 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.g-d1 { animation-delay: 60ms; }
.g-d2 { animation-delay: 120ms; }
.g-d3 { animation-delay: 180ms; }

/* ===== 블로그 카드 & 필터 ===== */
.blog-filter-btn {
  font-family: 'Pretendard', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border: 2px solid #E8E0D4;
  background: #fff;
  color: #9B8E7E;
  text-decoration: none;
  transition: all 0.12s;
  white-space: nowrap;
}
.blog-filter-btn:hover { border-color: #1a1a1a; color: #1a1a1a; }
.blog-mobile-select {
  font-family: 'Pretendard', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 28px 6px 12px;
  border: 1.5px solid #1a1a1a;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  color: #1a1a1a;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.blog-tab {
  color: #9B8E7E;
  text-decoration: none;
  padding: 2px 6px;
  transition: color 0.12s;
}
.blog-tab:hover { color: #1a1a1a; }
.blog-tab.is-active {
  color: #1a1a1a;
  font-weight: 600;
}
.blog-sort-btn {
  font-family: 'Pretendard', sans-serif;
  font-size: 11px;
  padding: 4px 10px;
  color: #bbb;
  text-decoration: none;
  transition: color 0.12s;
}
.blog-sort-btn:hover { color: #1a1a1a; }
.blog-sort-btn.is-active {
  color: #1a1a1a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.blog-filter-btn.is-active {
  background: #fff;
  border-color: #1a1a1a;
  color: #1a1a1a;
  font-weight: 600;
}
.blog-card {
  background: #fff;
  border: 2px solid #1a1a1a;
  border-left-width: 4px;
  padding: 16px 18px;
  transition: transform 0.12s, box-shadow 0.12s;
}
.blog-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #1a1a1a;
}
.blog-grid-card {
  background: #fff;
  border: 2px solid #1a1a1a;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.blog-grid-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #1a1a1a;
}
.blog-grid-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 2px solid #1a1a1a;
}
/* 읽기 진행률 바 */
.blog-progress-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  background: transparent;
}
.blog-progress-bar {
  height: 100%;
  background: #D4A04A;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

/* 모바일 블로그 상세 최적화 */
@media (max-width: 640px) {
  .topic-detail-card,
  .showcase-detail-card {
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
    margin-left: -16px;
    margin-right: -16px;
  }
  .blog-article-card {
    border-left: none;
    border-right: none;
    border-radius: 0;
    box-shadow: none;
    margin-left: -16px;
    margin-right: -16px;
  }
}

.blog-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1.5px solid #E8E0D4;
  background: #fff;
  font-family: 'Pretendard', sans-serif;
  font-size: 12px;
  color: #9B8E7E;
  cursor: pointer;
  transition: all 0.12s;
}
.blog-share-btn:hover {
  border-color: #1a1a1a;
  color: #1a1a1a;
}
.blog-card-title {
  font-family: 'Pretendard', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.45;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-excerpt {
  font-family: 'Pretendard', sans-serif;
  font-size: 13px;
  color: #999;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 640px) {
  .blog-card { padding: 14px 14px; }
  .blog-excerpt { display: none; }
}

/* ===== 블로그 본문 (prose-blog) ===== */
.prose-blog {
  font-family: 'Pretendard', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: #2C2417;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.prose-blog h1 {
  font-family: 'Pretendard', sans-serif;
  font-size: 1.5em;
  font-weight: 800;
  margin: 2.5em 0 0.6em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid #1a1a1a;
  color: #1a1a1a;
}
.prose-blog h2 {
  font-family: 'Pretendard', sans-serif;
  font-size: 1.25em;
  font-weight: 700;
  margin: 2em 0 0.5em;
  color: #1a1a1a;
}
.prose-blog h3 {
  font-family: 'Pretendard', sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  margin: 1.5em 0 0.4em;
  color: #1a1a1a;
}
.prose-blog p { margin: 1em 0; }
.prose-blog ul, .prose-blog ol { margin: 1em 0; padding-left: 1.5em; }
.prose-blog li { margin: 0.4em 0; }
.prose-blog a { color: #D4A04A; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose-blog a:hover { color: #b8892e; }
.prose-blog strong { font-weight: 700; color: #1a1a1a; }
.prose-blog blockquote {
  border-left: 4px solid #D4A04A;
  padding: 0.8em 1.2em;
  margin: 1.5em 0;
  color: #555;
  background: #FFF8E7;
}
.prose-blog blockquote p { margin: 0.4em 0; }
.prose-blog pre {
  background-color: #1a1a1a;
  color: #e0e0e0;
  padding: 1.2em 1.4em;
  padding-right: 3em;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 2px solid #1a1a1a;
  font-family: 'Pretendard', monospace;
  font-size: 13.5px;
  line-height: 1.7;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #555 #1a1a1a;
}
.prose-blog pre::-webkit-scrollbar { height: 6px; }
.prose-blog pre::-webkit-scrollbar-track { background: #1a1a1a; }
.prose-blog pre::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
.prose-blog pre::-webkit-scrollbar-thumb:hover { background: #777;
}

/* 코드 블록 복사 버튼 */
.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #444;
  background: #2a2a2a;
  color: #888;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}
.code-copy-btn:hover {
  border-color: #D4A04A;
  color: #D4A04A;
  background: #333;
}
.prose-blog code {
  font-family: 'Pretendard', monospace;
  font-size: 13.5px;
}
.prose-blog p code, .prose-blog li code {
  background-color: #F7F5F0;
  padding: 0.15em 0.5em;
  border: 1px solid #E8E0D4;
  font-size: 0.88em;
  color: #C8836C;
}
.prose-blog img {
  max-width: 100%;
  border: 2px solid #1a1a1a;
  margin: 1.5em 0;
}
.prose-blog table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14px;
}
.prose-blog th, .prose-blog td {
  border: 2px solid #1a1a1a;
  padding: 0.7em 1em;
  text-align: left;
}
.prose-blog th { background-color: #E8D4A8; font-family: 'Pretendard', sans-serif; font-weight: 600; }
.prose-blog hr {
  border: none;
  border-top: 1px solid #E8E0D4;
  margin: 2.5em 0;
}

/* ===== Tool Picker Buttons ===== */
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 2px solid #000;
  background: #FFFFFF;
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 0.75rem;
  color: #2C2417;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.tool-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0px #000;
}
.tool-btn.selected {
  background: #E8D4A8;
  border-color: #000;
  box-shadow: inset 2px 2px 0px rgba(0,0,0,0.15);
  transform: translate(1px, 1px);
}
.tool-btn.selected:hover {
  background: #E8D4A8;
  box-shadow: inset 2px 2px 0px rgba(0,0,0,0.15);
  transform: translate(1px, 1px);
}

/* ===== BEST 탭 ===== */
.best-tab {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 11px;
  padding: 4px 12px;
  border: 2px solid #000;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--text-faint);
}
.best-tab:hover {
  background: #F7F5F0;
  color: var(--text);
}
.best-tab.is-active {
  background: var(--nav-bg);
  color: var(--nav-text);
}

/* ===== 익명 토글 ===== */
.anon-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.anon-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 2px solid #000;
  background: #FFFFFF;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.anon-toggle input[type="checkbox"]:checked {
  background: var(--nav-bg);
}
.anon-toggle input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 3px;
  width: 4px;
  height: 7px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.anon-toggle span {
  font-family: 'Galmuri11', sans-serif;
  font-size: 10px;
  color: var(--text-faint);
  transition: color 0.15s ease;
}
.anon-toggle:hover span {
  color: var(--text-sub);
}

/* ===== 쇼케이스 컴포넌트 ===== */
.showcase-panel {
  background: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  overflow: hidden;
}

.showcase-hero-card {
  position: relative;
  background: #FFFFFF;
  border: 3px solid #000;
  overflow: hidden;
  transition: all 0.2s ease-out;
}
.showcase-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #FFD700, #E8573A);
  z-index: 2;
}
.showcase-hero-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
}

.showcase-card {
  position: relative;
  background: #FFFFFF;
  border: 3px solid #000;
  overflow: hidden;
  transition: all 0.2s ease-out;
}
.showcase-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #000;
}

.showcase-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #000;
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 11px;
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
}
.showcase-rank.is-gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #2a1810;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
.showcase-rank.is-silver {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: #2a1810;
}
.showcase-rank.is-bronze {
  background: linear-gradient(135deg, #CD7F32, #A0522D);
  color: #FFFFFF;
}

.showcase-tool-tag {
  font-family: 'Galmuri11', sans-serif;
  font-size: 10px;
  color: var(--text-sub);
  padding: 2px 6px;
  background: #E8D4A8;
  border: 1px solid #000;
}

.showcase-info-section {
  padding: 16px 20px;
  border-bottom: 2px solid var(--border);
}
.showcase-info-section:last-child {
  border-bottom: none;
}
@media (min-width: 640px) {
  .showcase-info-section { padding: 20px 24px; }
}

.showcase-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Galmuri11', sans-serif;
  font-size: 10px;
  color: var(--text-sub);
  padding: 4px 10px;
  border: 1px solid #000;
  background: var(--gold-light);
}

/* ===== 업로드 드래그 & 프로그레스 ===== */
.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  border: 2px dashed #000;
  background: var(--gold-light);
  transition: all 0.2s ease;
  cursor: pointer;
}
.upload-dropzone.is-dragover {
  border-style: solid;
  background: #E8D4A8;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #000;
}

.upload-progress-track {
  height: 16px;
  border: 3px solid #000;
  background: #1A1714;
  overflow: hidden;
}
.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #E8573A, #FFD700, #7BA88E);
  background-size: 300% 100%;
  animation: upload-shimmer 2s linear infinite;
  transition: width 0.3s ease;
  position: relative;
}
.upload-progress-bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: rgba(255,255,255,0.25);
}
@keyframes upload-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.upload-progress-bar.is-complete {
  background: #7BA88E;
  animation: none;
  background-size: 100% 100%;
}

.game-btn.is-uploading {
  opacity: 0.6;
  cursor: not-allowed;
  animation: upload-pulse 1.5s ease-in-out infinite;
}
@keyframes upload-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.9; }
}

/* ===== 퀘스트 XP바 ===== */
.quest-xp-bar {
  height: 14px;
  border: 3px solid #000;
  background: #1A1714;
  overflow: hidden;
}
.quest-xp-bar-lg { height: 18px; }
.quest-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #D4A04A, #FFD700, #E8D4A8);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.quest-xp-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: rgba(255,255,255,0.25);
}
.quest-xp-fill.is-full {
  background: linear-gradient(90deg, #7BA88E, #A8D4B8, #7BA88E);
}

/* ===== 퀘스트 난이도 별 ===== */
.quest-stars { display: flex; gap: 2px; }
.quest-star {
  width: 10px; height: 10px;
  background: #D4A04A;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.quest-star.is-empty { background: #D4CFC4; }

/* ===== 퀘스트 목록 카드 ===== */
.quest-card {
  background: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  overflow: hidden;
  transition: all 0.2s ease-out;
}
.quest-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
}

/* ===== 듀오링고 스타일 맵 경로 ===== */
.quest-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
  position: relative;
}

/* 맵 노드 (스테이지 원) */
.stage-node {
  width: 56px;
  height: 56px;
  border: 4px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.stage-node:hover { transform: scale(1.08); }

.stage-node.is-cleared {
  background: #7BA88E;
  box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px #7BA88E;
}
.stage-node.is-current {
  background: #FFD700;
  box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px #D4A04A, 0 0 20px rgba(255,215,0,0.4);
  animation: stageGlow 2s ease-in-out infinite;
}
.stage-node.is-locked {
  background: #D4CFC4;
  border-color: #9B8E7E;
  opacity: 0.5;
}
.stage-node.is-locked:hover { transform: none; }

@keyframes stageGlow {
  0%, 100% { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px #D4A04A, 0 0 16px rgba(255,215,0,0.3); }
  50% { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px #D4A04A, 0 0 24px rgba(255,215,0,0.6); }
}

/* 맵 행 (지그재그) */
.stage-row {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 320px;
  padding: 4px 0;
}
.stage-row.align-left { justify-content: flex-start; padding-left: 10%; }
.stage-row.align-center { justify-content: center; }
.stage-row.align-right { justify-content: flex-end; padding-right: 10%; }

/* 노드 사이 연결 도트 */
.stage-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  width: 100%;
  max-width: 320px;
}
.stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D4CFC4;
}
.stage-dot.is-cleared { background: #7BA88E; }
.stage-dot.is-active { background: #D4A04A; }

/* 스테이지 라벨 (노드 옆) */
.stage-label {
  position: absolute;
  white-space: nowrap;
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 12px;
  color: #2C2417;
  pointer-events: none;
}
.stage-label.is-locked { color: #9B8E7E; }
.stage-label-left { right: calc(100% + 12px); text-align: right; }
.stage-label-right { left: calc(100% + 12px); text-align: left; }
@media (max-width: 480px) {
  .stage-label { display: none; }
}

/* ===== 완료 버튼 ===== */
.quest-complete-btn {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 18px;
  border: 4px solid #000;
  padding: 14px 48px;
  cursor: pointer;
  background: linear-gradient(180deg, #FFD700 0%, #D4A04A 100%);
  color: #000;
  box-shadow: 4px 4px 0px #000;
  transition: all 0.15s ease-out;
  letter-spacing: 2px;
  border-radius: 8px;
}
.quest-complete-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
  background: linear-gradient(180deg, #FFE44D 0%, #D4A04A 100%);
}
.quest-complete-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000;
}

/* ===== 클리어 배너 ===== */
.quest-clear-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #7BA88E, #5E9070);
  border: 3px solid #000;
  box-shadow: 3px 3px 0px #000;
  color: #FFFFFF;
  padding: 6px 16px;
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}
.quest-clear-badge::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  animation: clearShine 3s ease-in-out infinite;
}
@keyframes playerBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes clearShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ===== 퀘스트 맵 보드 ===== */
.quest-map-board {
  background-color: #E8DCC8;
  image-rendering: pixelated;
  background-image:
    url("/Paper-Pixels-8x8/Tiles.png");
  background-size: 32px auto;
  background-repeat: repeat;
  background-position: 0 0;
  position: relative;
}
.quest-map-board::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(232, 220, 200, 0.55);
  pointer-events: none;
  z-index: 0;
}
.quest-map-board > * {
  position: relative;
  z-index: 1;
}

/* ===== Confetti 파티클 ===== */
@keyframes confettiFall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(var(--drift)) rotate(var(--spin));
    opacity: 0;
  }
}

/* ===== 퀘스트 클리어 오버레이 ===== */
@keyframes clearTextPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes clearTextGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(255,215,0,0.3), 0 2px 0 #000; }
  50% { text-shadow: 0 0 20px rgba(255,215,0,0.6), 0 0 40px rgba(255,215,0,0.2), 0 2px 0 #000; }
}
.quest-clear-text {
  animation: clearTextPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, clearTextGlow 2s ease-in-out 0.6s infinite;
  opacity: 0;
}
@keyframes clearSubFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.quest-clear-sub {
  opacity: 0;
  animation: clearSubFade 0.5s ease-out 0.8s forwards;
}
.quest-clear-cta {
  opacity: 0;
  animation: clearSubFade 0.5s ease-out 1.2s forwards;
}

/* 코스 클리어 축하 */
.course-clear-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  animation: clearFadeIn 0.3s ease-out;
  cursor: pointer;
  padding: 24px;
}
.course-clear-card {
  text-align: center;
  padding: 32px 24px;
  cursor: default;
  max-width: 420px;
  width: 100%;
}
.course-clear-btn {
  padding: 12px 32px;
  background: #D4A04A;
  color: #2C2417;
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 14px;
  border: 2px solid #D4A04A;
  box-shadow: 3px 3px 0px rgba(255,255,255,0.15);
  cursor: pointer;
  transition: all 0.12s;
}
.course-clear-btn:hover {
  background: #e0b45a;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px rgba(255,255,255,0.15);
}
.course-clear-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(255,255,255,0.15);
}
@keyframes clearFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes clearBounce {
  0% { opacity: 0; transform: scale(0.8) translateY(20px); }
  60% { opacity: 1; transform: scale(1.03) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ========== 튜토리얼 레이아웃 시스템 ========== */

.tut-body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #f3e4da;
  color: #1a1a1a;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* 상단 바 */
.tut-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 52px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}
.tut-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tut-topbar-logo {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 13px;
  color: #1a1a1a;
  text-decoration: none;
  transition: opacity 0.15s;
}
.tut-topbar-logo:hover { opacity: 0.7; }
.tut-topbar-sep {
  width: 1px;
  height: 16px;
  background: #e0e0e0;
}
.tut-topbar-link {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  transition: color 0.15s;
}
.tut-topbar-link:hover { color: #1a1a1a; }
.tut-topbar-link.is-active { color: #1a1a1a; font-weight: 600; }
.tut-topbar-avatar { display: flex; }
.tut-topbar-btn {
  font-size: 13px;
  color: #fff;
  background: #1a1a1a;
  padding: 5px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}
.tut-topbar-btn:hover { background: #333; }

/* Flash */
.tut-flash {
  max-width: 600px;
  margin: 12px auto;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: tut-fade-in 0.3s ease;
}
.tut-flash-notice { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.tut-flash-alert { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.tut-flash-close { background: none; border: none; cursor: pointer; font-size: 18px; color: inherit; opacity: 0.5; }
.tut-flash-close:hover { opacity: 1; }

@keyframes tut-fade-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 메인 */
.tut-main { min-height: calc(100vh - 52px); }

/* 카드 */
.tut-card {
  background: #fff;
  border: 2px solid #1a1a1a;
  border-radius: 0;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  box-shadow: none;
}
.tut-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0px #1a1a1a;
}

/* 프로그레스 바 (심플) */
.tut-progress {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}
.tut-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 체크마크 (브루탈 스퀘어) */
.tut-check {
  width: 26px;
  height: 26px;
  border-radius: 0;
  border: 2px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 12px;
  color: #1a1a1a;
  background: #F7F5F0;
  transition: all 0.15s;
}
.tut-check.is-done {
  background: #7BA88E;
  border-color: #1a1a1a;
  color: #fff;
}
.tut-check.is-current {
  border-color: #1a1a1a;
  background: #D4A04A;
  color: #fff;
  box-shadow: 2px 2px 0px #1a1a1a;
}

/* 레슨 사이드바 (튜토리얼 전용 - 다크) */
.tut-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #E8E0D4;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
.tut-sidebar::-webkit-scrollbar { width: 4px; }
.tut-sidebar::-webkit-scrollbar-track { background: transparent; }
.tut-sidebar::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.tut-sidebar-head {
  padding: 20px 16px;
  border-bottom: 1px solid #e0e0e0;
}
.tut-sidebar-head a { text-decoration: none; }
.tut-sidebar-head-title {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 13px;
  color: #1a1a1a;
  margin-bottom: 10px;
  line-height: 1.4;
}
.tut-sidebar-progress {
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  overflow: hidden;
}
.tut-sidebar-progress-fill {
  height: 100%;
  background: #D4A04A;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.tut-sidebar-meta {
  font-size: 11px;
  color: #999;
  margin-top: 6px;
}

.tut-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: #777;
  text-decoration: none;
  transition: all 0.12s;
  border-left: 3px solid transparent;
}
.tut-sidebar-item:hover {
  background: rgba(0,0,0,0.04);
  color: #1a1a1a;
}
.tut-sidebar-item.is-active {
  background: #FFF8E7;
  color: #1a1a1a;
  border-left-color: #D4A04A;
  border-left-width: 4px;
  font-weight: 600;
}
.tut-sidebar-item.is-done {
  color: #aaa;
}
.tut-sidebar-item.is-done:hover {
  color: #777;
}

/* 사이드바용 체크마크 (밝은 배경) */
.tut-check-dark {
  width: 22px;
  height: 22px;
  border-radius: 0;
  border: 1.5px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 10px;
  color: #1a1a1a;
  background: #F7F5F0;
  transition: all 0.15s;
}
.tut-check-dark.is-done {
  background: #7BA88E;
  border-color: #1a1a1a;
  color: #fff;
}
.tut-check-dark.is-current {
  border-color: #1a1a1a;
  background: #D4A04A;
  color: #fff;
}

/* 레슨 콘텐츠 (튜토리얼 전용) */
.tut-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  background: #fff;
}
.tut-content-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 48px 80px;
}

/* 튜토리얼 프로즈 (본문) */
.tut-prose {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15.5px;
  line-height: 1.75;
  color: #444;
  word-break: keep-all;
  letter-spacing: -0.01em;
  max-width: 620px;
}
.tut-prose h1 {
  font-size: 1.4em;
  font-weight: 700;
  color: #1a1a1a;
  margin: 2em 0 0.6em;
}
.tut-prose h2 {
  font-size: 1.2em;
  font-weight: 700;
  color: #1a1a1a;
  margin: 2em 0 0.5em;
}
.tut-prose h3 {
  font-size: 1.05em;
  font-weight: 600;
  color: #1a1a1a;
  margin: 1.6em 0 0.4em;
}
.tut-prose p { margin: 0.9em 0; }
.tut-prose ul { margin: 0.8em 0; padding-left: 1.4em; list-style-type: disc; }
.tut-prose ol { margin: 0.8em 0; padding-left: 1.4em; list-style-type: decimal; }
.tut-prose li { margin: 0.35em 0; line-height: 1.7; }
.tut-prose li::marker { color: #bbb; }
.tut-prose strong { font-weight: 600; color: #1a1a1a; }
.tut-prose a { color: #2563eb; text-decoration: underline; text-underline-offset: 3px; }
.tut-prose a:hover { color: #1d4ed8; }
.tut-prose blockquote {
  border: 2px solid #1a1a1a;
  box-shadow: 3px 3px 0px #1a1a1a;
  background: #fff;
  padding: 16px 20px;
  margin: 1.4em 0;
  color: #444;
  font-size: 14.5px;
  line-height: 1.7;
}
.tut-prose pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 1.5em 0;
  border-radius: 8px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.6;
}
.tut-prose code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.9em;
}
.tut-prose p code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: #e11d48;
}
.tut-prose img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1.5em 0;
}
.tut-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14px;
}
.tut-prose th, .tut-prose td {
  border: 1px solid #e8e8e8;
  padding: 10px 14px;
  text-align: left;
}
.tut-prose th { background: #fafafa; font-weight: 600; }
.tut-prose hr { border: none; border-top: 1px solid #e8e8e8; margin: 2.5em 0; }

/* 브루탈 버튼 (튜토리얼) */
.tut-brutal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #1a1a1a;
  box-shadow: 3px 3px 0px #1a1a1a;
  font-family: 'Pretendard', sans-serif;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  text-decoration: none;
}
.tut-brutal-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #1a1a1a;
}
.tut-brutal-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #1a1a1a;
}

/* 시작하기 버튼 */
.tut-btn-start {
  box-shadow: 3px 3px 0px #1a1a1a;
}
.tut-btn-start:hover {
  background: #3d3024 !important;
  box-shadow: 5px 5px 0px #1a1a1a;
}
.tut-btn-start:active {
  box-shadow: 1px 1px 0px #1a1a1a;
}

/* 커리큘럼 아이템 */
.tut-syllabus-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: background 0.12s, box-shadow 0.12s;
  border-top: 1px solid #E8E0D4;
}
.tut-syllabus-item:first-child { border-top: none; }
.tut-syllabus-item:hover {
  background: #FFF8E7;
}
.tut-syllabus-item:hover .tut-check:not(.is-done) {
  box-shadow: 2px 2px 0px #1a1a1a;
  background: #E8D4A8;
}
.tut-syllabus-item.is-completed { background: #FAFAF7; }
.tut-syllabus-item:hover .tut-arrow {
  stroke: #1a1a1a;
  transform: translateX(3px);
  transition: all 0.15s;
}
.tut-syllabus-item.is-locked {
  opacity: 0.45;
  pointer-events: none;
}

/* 튜토리얼 코스 모바일 최적화 */
@media (max-width: 639px) {
  .tut-section-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 16px !important;
  }
  .tut-course-card {
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
    padding: 20px 16px !important;
  }
  .tut-course-card .tut-course-header {
    padding: 18px 16px 12px;
  }
  .tut-course-sidebar {
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
    border-top: 1px solid #E8E0D4 !important;
    border-bottom: none !important;
    margin-top: 4px;
    padding: 16px 0 0 !important;
  }
  .tut-syllabus-item {
    gap: 10px;
    padding: 12px 16px;
  }
  .tut-syllabus-item .tut-check {
    width: 22px;
    height: 22px;
    font-size: 10px;
    flex-shrink: 0;
  }
  .tut-lesson-title {
    font-size: 13px !important;
  }
  .tut-lesson-badges span {
    padding: 2px 6px !important;
    font-size: 9px !important;
  }
}

/* 완료 버튼 (튜토리얼) */
.tut-complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: #7BA88E;
  color: #fff;
  border: 2px solid #1a1a1a;
  box-shadow: 3px 3px 0px #1a1a1a;
  font-family: 'Pretendard', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tut-complete-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0px #1a1a1a; background: #6b9a7e; }
.tut-complete-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0px #1a1a1a; }

/* 완료 뱃지 */
.tut-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: #f0f7f2;
  color: #5a8a6a;
  border: 2px solid #1a1a1a;
  box-shadow: 3px 3px 0px #1a1a1a;
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 600;
}

/* 비디오 래퍼 */
.tut-video {
  overflow: hidden;
  background: #000;
  margin: 24px -24px;
  border: 2px solid #1a1a1a;
  box-shadow: 4px 4px 0px #1a1a1a;
}

/* 네비게이션 (이전/다음) */
.tut-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid #1a1a1a;
  background: #fff;
  box-shadow: 3px 3px 0px #1a1a1a;
  text-decoration: none;
  color: #666;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  font-size: 13px;
  font-family: 'Pretendard', sans-serif;
}
.tut-nav-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #1a1a1a;
  color: #1a1a1a;
}

/* 잠금 상태 */
.tut-lock-overlay {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
}

/* 애니메이션 */
@keyframes tut-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.tut-anim { animation: tut-slide-up 0.4s ease forwards; opacity: 0; }
.tut-anim-d1 { animation-delay: 50ms; }
.tut-anim-d2 { animation-delay: 100ms; }
.tut-anim-d3 { animation-delay: 150ms; }

/* 모바일 사이드바 토글 */
@media (max-width: 767px) {
  .tut-sidebar {
    top: 56px;
    height: calc(100vh - 56px);
  }
}
@media (max-width: 1023px) {
  .tut-sidebar { display: none; }
  .tut-content-inner { padding: 20px 16px 60px; }
  .tut-video { margin-left: -16px; margin-right: -16px; border-left: none; border-right: none; box-shadow: none; }
}

/* 키보드 키 스타일 */
.kbd {
  display: inline-block;
  padding: 3px 8px;
  font-family: 'Pretendard', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  background: #f5f5f5;
  border: 2px solid #1a1a1a;
  box-shadow: 0 2px 0 #1a1a1a;
  border-radius: 0;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.4;
}

/* 복사 버튼 (셋업 가이드) */
.setup-copy-wrap {
  position: relative;
}
.setup-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px;
  color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.setup-copy-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.2);
}
.setup-copy-btn svg {
  width: 14px;
  height: 14px;
}

/* 코드 블록 스크롤바 */
.tut-prose pre {
  white-space: pre;
  overflow-x: auto;
  padding-right: 40px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.tut-prose pre::-webkit-scrollbar { height: 4px; }
.tut-prose pre::-webkit-scrollbar-track { background: transparent; }
.tut-prose pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

/* 터미널 성공 예시 */
.setup-terminal-example {
  background: #1e1e1e;
  border: 2px solid #1a1a1a;
  box-shadow: 3px 3px 0 #1a1a1a;
  padding: 16px 20px;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.8;
  color: #d4d4d4;
  overflow-x: auto;
}
.setup-terminal-example .prompt { color: #22c55e; }
.setup-terminal-example .output { color: #999; }

/* 셋업 도움 링크 */
.setup-help-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  text-decoration: none;
  background: #fff;
  transition: background 0.15s;
}
.setup-help-link:hover {
  background: #fafafa;
}

/* 모바일 도움 버튼 */
.setup-mobile-help, .setup-mobile-help-spacer { display: none !important; }
.setup-bottom-help { display: none; }
@media (max-width: 1023px) {
  .setup-bottom-help { display: block; }
}

/* 셋업 모바일 최적화 */
@media (max-width: 767px) {
  .setup-hero-title { font-size: 20px !important; line-height: 1.4 !important; }
  .setup-hero-card { padding: 24px 16px !important; }
  .setup-hero-sub { font-size: 11px !important; line-height: 1.6 !important; }
  .setup-hero-card { padding: 24px 16px !important; }
  .setup-os-tab { padding: 8px 20px !important; font-size: 13px !important; }
  .setup-card-inner { padding: 16px !important; }
  .setup-card-outer { padding: 12px 12px 0 !important; }
  .setup-step-num { width: 26px !important; height: 26px !important; font-size: 11px !important; }
  .setup-step-title { font-size: 17px !important; }
  .setup-terminal-example { font-size: 10px !important; padding: 10px 12px !important; }
  .kbd { font-size: 10px !important; padding: 2px 5px !important; }
  .setup-checklist { gap: 8px !important; }
}

/* OS 탭 (셋업 가이드) */
.setup-os-tab.is-active {
  background: #1a1a1a !important;
  color: #fff !important;
}

/* OS 인디케이터 - Step 번호 색상 */
[data-os-indicator="windows"] .setup-step-num { background: #0078d4 !important; }
[data-os-indicator="mac"] .setup-step-num { background: #555 !important; }

/* OS 탭 버튼 활성 상태 강화 */
.setup-os-tab[data-os="windows"].is-active { background: #0078d4 !important; }
.setup-os-tab[data-os="mac"].is-active { background: #555 !important; }

/* ========== 튜토리얼 / 코스 / 레슨 (레거시) ========== */

/* 코스 카드 (튜토리얼 인덱스) */
.course-card {
  background: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  overflow: hidden;
  transition: all 0.2s ease-out;
  position: relative;
}
.course-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
}
.course-card-banner {
  height: 100px;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid #000;
}
.course-card-banner-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #2C2417 0%, #4A3C2E 50%, #2C2417 100%);
}
.course-card-banner-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(212, 160, 74, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(123, 168, 142, 0.1) 0%, transparent 40%);
}
.course-card-banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255,255,255,0.02) 3px,
    rgba(255,255,255,0.02) 4px
  );
  image-rendering: pixelated;
}
.course-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  border: 2px solid rgba(212,160,74,0.4);
  padding: 3px 10px;
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 10px;
  color: #D4A04A;
  letter-spacing: 1px;
}
.course-card-icon {
  position: absolute;
  bottom: -16px;
  left: 20px;
  width: 48px;
  height: 48px;
  border: 3px solid #000;
  background: #E8D4A8;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* 레슨 사이드바 (레슨 상세) */
.lesson-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #D4CFC4 transparent;
}
.lesson-sidebar::-webkit-scrollbar { width: 4px; }
.lesson-sidebar::-webkit-scrollbar-track { background: transparent; }
.lesson-sidebar::-webkit-scrollbar-thumb { background: #D4CFC4; border-radius: 2px; }

.lesson-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}
.lesson-nav-item:hover {
  background: #FAF5EE;
  border-left-color: #E8E0D4;
}
.lesson-nav-item.is-active {
  background: #FBF4E4;
  border-left-color: #D4A04A;
  border-left-width: 4px;
}
.lesson-nav-item.is-completed {
  border-left-color: #7BA88E;
  background: #f7fbf8;
}
.lesson-nav-num {
  width: 24px;
  height: 24px;
  border: 2px solid #E8E0D4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 10px;
  color: #9B8E7E;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.lesson-nav-item.is-active .lesson-nav-num {
  border-color: #D4A04A;
  background: #D4A04A;
  color: #fff;
}
.lesson-nav-item.is-completed .lesson-nav-num {
  border-color: #7BA88E;
  background: #7BA88E;
  color: #fff;
}

/* 레슨 진행 바 (상단 고정) */
.lesson-progress-bar {
  height: 4px;
  background: #E8E0D4;
  position: relative;
  overflow: hidden;
}
.lesson-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #D4A04A, #FFD700);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 레슨 콘텐츠 영역 */
.lesson-content-area {
  background: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
}
.lesson-content-area .prose-blog {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  color: #333;
  word-break: keep-all;
}
.lesson-content-area .prose-blog h1 {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 1.5em;
  margin: 2.5em 0 0.8em;
  padding-bottom: 0.4em;
  border-bottom: 3px solid #000;
}
.lesson-content-area .prose-blog h2 {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 1.25em;
  margin: 2em 0 0.8em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid #E8E0D4;
}
.lesson-content-area .prose-blog h3 {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 1.1em;
  margin: 1.5em 0 0.6em;
  color: #2C2417;
}
.lesson-content-area .prose-blog p {
  margin: 1em 0;
}
.lesson-content-area .prose-blog li {
  margin: 0.5em 0;
}
.lesson-content-area .prose-blog strong {
  font-weight: 600;
  color: #1a1a1a;
}
.lesson-content-area .prose-blog blockquote {
  border-left: 4px solid #D4A04A;
  background: #FBF4E4;
  padding: 1em 1.2em;
  margin: 1.5em 0;
  font-size: 15px;
  color: #555;
}
.lesson-content-area .prose-blog pre {
  font-family: 'Pretendard', monospace;
  font-size: 14px;
  line-height: 1.7;
  border-radius: 4px;
}
.lesson-content-area .prose-blog p code {
  font-family: 'Pretendard', monospace;
  font-size: 0.9em;
  background: #f5f5f5;
  padding: 0.2em 0.5em;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
}
.lesson-content-area .prose-blog table {
  font-size: 14px;
}
.lesson-content-area .prose-blog th {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-weight: normal;
}

/* 레슨 비디오 래퍼 */
.lesson-video-wrap {
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  background: #0a0a0a;
  overflow: hidden;
}

/* 코스 로드맵 (코스 상세) */
.roadmap-step {
  display: flex;
  gap: 16px;
  position: relative;
}
.roadmap-line {
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: -8px;
  width: 2px;
  background: #E8E0D4;
}
.roadmap-step:last-child .roadmap-line { display: none; }
.roadmap-step.is-completed .roadmap-line { background: #7BA88E; }
.roadmap-node {
  width: 40px;
  height: 40px;
  border: 3px solid #E8E0D4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #FFFFFF;
  transition: all 0.2s ease;
  z-index: 1;
}
.roadmap-step.is-completed .roadmap-node {
  border-color: #7BA88E;
  background: #7BA88E;
}
.roadmap-step .roadmap-body {
  flex: 1;
  padding-bottom: 20px;
}
.roadmap-body-link {
  display: block;
  padding: 12px 16px;
  border: 2px solid #E8E0D4;
  background: #FFFFFF;
  transition: all 0.15s ease;
  text-decoration: none;
}
.roadmap-body-link:hover {
  border-color: #000;
  box-shadow: 3px 3px 0px #000;
  transform: translate(-1px, -1px);
}
.roadmap-step.is-completed .roadmap-body-link {
  border-color: #c8e0d0;
  background: #f7fbf8;
}

/* 코스 헤더 그라디언트 */
.course-header-gradient {
  background: linear-gradient(135deg, #2C2417 0%, #3D3024 40%, #2C2417 100%);
  position: relative;
  overflow: hidden;
}
.course-header-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(212,160,74,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 20%, rgba(123,168,142,0.08) 0%, transparent 50%);
}
.course-header-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255,255,255,0.015) 3px,
    rgba(255,255,255,0.015) 4px
  );
  image-rendering: pixelated;
}

/* 코스 스탯 카드 */
.course-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
}

/* ===== 수업자료 페이지 ===== */
.materials-header {
  border: 3px solid #1a1a1a;
  box-shadow: 4px 4px 0px #1a1a1a;
  background: #fff;
  padding: 32px 28px;
  margin-bottom: 24px;
  text-align: center;
}
.materials-header h1 {
  font-family: 'Pretendard', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: #1a1a1a;
  line-height: 1.35;
  margin-bottom: 8px;
}
@media (min-width: 640px) {
  .materials-header h1 { font-size: 28px; }
  .materials-header { padding: 48px 40px; }
}
.materials-subtitle {
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  color: #9B8E7E;
  margin-bottom: 16px;
}
.materials-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 16px;
}
.materials-tags span {
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 10px;
  padding: 3px 10px;
  border: 2px solid #1a1a1a;
  background: #E8D4A8;
  color: #1a1a1a;
}
.materials-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Pretendard', sans-serif;
  font-size: 12px;
  color: #bbb;
}
.materials-meta span + span::before {
  content: '·';
  margin-right: 8px;
}

/* 본문 */
.materials-body {
  border: 3px solid #1a1a1a;
  box-shadow: 4px 4px 0px #1a1a1a;
  background: #fff;
}

.materials-section {
  padding: 28px 24px;
  border-bottom: 2px solid #E8E0D4;
}
.materials-section:last-child {
  border-bottom: none;
}
@media (min-width: 640px) {
  .materials-section { padding: 40px 48px; }
}

.materials-section-label {
  display: inline-block;
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: #D4A04A;
  background: #FFF8E7;
  padding: 3px 10px;
  border: 1.5px solid #E8D4A8;
  margin-bottom: 10px;
}

.materials-section h2 {
  font-family: 'Pretendard', sans-serif;
  font-weight: 800;
  font-size: 19px;
  color: #1a1a1a;
  margin-bottom: 12px;
  line-height: 1.35;
}
@media (min-width: 640px) {
  .materials-section h2 { font-size: 22px; }
}

.materials-section h3 {
  font-family: 'Pretendard', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #1a1a1a;
  margin-top: 18px;
  margin-bottom: 8px;
}

.materials-section p {
  font-family: 'Pretendard', sans-serif;
  font-size: 14.5px;
  color: #444;
  line-height: 1.75;
  margin-bottom: 8px;
}
.materials-section p strong {
  color: #D4A04A;
  font-weight: 700;
}

.materials-section ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px;
}
.materials-section ul li {
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  padding-left: 18px;
  position: relative;
  margin-bottom: 4px;
}
.materials-section ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  background: #D4A04A;
}
.materials-section a {
  color: #D4A04A;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.materials-section a:hover {
  color: #1a1a1a;
}

/* 박스 스타일 */
.materials-explain {
  font-family: 'Pretendard', sans-serif;
  font-size: 13.5px !important;
  color: #9B8E7E !important;
  line-height: 1.7;
  padding: 12px 16px;
  background: #FAF8F4;
  border-left: 3px solid #E8D4A8;
  margin: 12px 0;
}

.materials-highlight {
  padding: 16px 20px;
  background: #FFF8E7;
  border: 2px solid #E8D4A8;
  margin: 12px 0;
}
.materials-highlight p {
  margin-bottom: 4px;
  color: #5c3a2e;
}

.materials-warning {
  padding: 14px 18px;
  background: #fef0ee;
  border: 2px solid #e8573a;
  margin: 12px 0;
}
.materials-warning p {
  color: #c0392b;
  font-size: 13.5px;
  margin-bottom: 0;
}
.materials-warning strong {
  color: #c0392b !important;
}

.materials-success {
  padding: 14px 18px;
  background: #eef8f4;
  border: 2px solid #7BA88E;
  margin: 12px 0;
}
.materials-success p {
  color: #27856a;
  font-size: 13.5px;
  margin-bottom: 0;
}

.materials-info {
  padding: 14px 18px;
  background: #F7F5F0;
  border: 2px solid #E8E0D4;
  margin: 12px 0;
}
.materials-info p {
  font-size: 13.5px;
  margin-bottom: 0;
}
.materials-info h3 {
  margin-top: 0;
}

.materials-dim {
  font-size: 12px !important;
  color: #bbb !important;
}

/* 2컬럼 그리드 */
.materials-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0;
}
@media (min-width: 640px) {
  .materials-grid-2 { grid-template-columns: 1fr 1fr; }
}

.materials-card {
  padding: 16px 18px;
  border: 2px solid #1a1a1a;
  background: #fff;
}
.materials-card h3 {
  margin-top: 0;
  font-size: 14px;
}
.materials-card ul {
  margin-bottom: 0;
}
.materials-card-danger {
  border-color: #e8573a;
  background: #fef8f7;
}
.materials-card-danger h3 { color: #c0392b; }
.materials-card-danger li::before { background: #e8573a; }

.materials-card-success {
  border-color: #7BA88E;
  background: #f5faf7;
}
.materials-card-success h3 { color: #27856a; }
.materials-card-success li::before { background: #7BA88E; }

/* 사례 카드 */
.materials-case {
  padding: 16px 18px;
  border: 2px solid #E8E0D4;
  background: #FDFCFA;
  margin: 12px 0;
}
.materials-case-label {
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: #D4A04A;
  margin-bottom: 6px;
}
.materials-case h3 {
  font-size: 14px;
  margin-top: 0;
  margin-bottom: 6px;
}
.materials-case-result {
  font-family: 'Pretendard', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #c0392b;
  padding: 8px 12px;
  background: #fef0ee;
  border-left: 3px solid #c0392b;
  margin-top: 10px;
}
.materials-case-result-success {
  color: #27856a;
  background: #eef8f4;
  border-left-color: #7BA88E;
}
.materials-source {
  font-size: 11px !important;
  color: #bbb !important;
  margin-top: 8px;
}

/* 사례 예시 박스 */
.materials-example {
  padding: 14px 18px;
  background: #F7F5F0;
  border: 2px solid #E8E0D4;
  font-family: 'Pretendard', sans-serif;
  font-size: 12.5px;
  color: #666;
  line-height: 1.8;
  margin: 12px 0;
}
.materials-example strong { color: #333; }
.materials-example a { font-size: 11px; }

/* 테이블 */
.materials-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-family: 'Pretendard', sans-serif;
  font-size: 13px;
}
.materials-table th {
  background: #1a1a1a;
  color: #E8D4A8;
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 11px;
  padding: 10px 14px;
  text-align: left;
  letter-spacing: 0.5px;
}
.materials-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #E8E0D4;
  color: #444;
  line-height: 1.6;
  vertical-align: top;
}
.materials-table td strong {
  color: #c0392b !important;
}
.materials-table small {
  color: #9B8E7E;
  font-size: 11.5px;
}
@media (max-width: 639px) {
  .materials-table { font-size: 11.5px; }
  .materials-table th, .materials-table td { padding: 8px 10px; }
}

/* 체크리스트 */
.materials-checklist {
  list-style: none !important;
  padding: 0 !important;
}
.materials-checklist li {
  padding-left: 28px !important;
  position: relative;
  margin-bottom: 6px !important;
}
.materials-checklist li::before {
  content: '' !important;
  width: 16px !important;
  height: 16px !important;
  background: #7BA88E !important;
  border: 2px solid #1a1a1a;
  position: absolute;
  left: 0;
  top: 4px;
}
.materials-checklist li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* 프롬프트 박스 */
.materials-prompt {
  position: relative;
  margin: 14px 0;
  border: 2px solid #1a1a1a;
  background: #2C2417;
}
.materials-prompt pre {
  font-family: 'Pretendard', sans-serif;
  font-size: 12px;
  color: #E8D4A8;
  line-height: 1.7;
  padding: 20px;
  padding-top: 44px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.materials-prompt-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 10px;
  padding: 4px 12px;
  border: 1.5px solid #E8D4A8;
  background: transparent;
  color: #E8D4A8;
  cursor: pointer;
  transition: all 0.15s;
  z-index: 2;
}
.materials-prompt-copy:hover {
  background: #E8D4A8;
  color: #2C2417;
}
.materials-prompt-copy.is-copied {
  background: #7BA88E;
  border-color: #7BA88E;
  color: #fff;
}

/* 마무리 섹션 */
.materials-section-end {
  text-align: center;
  padding-top: 40px;
  padding-bottom: 40px;
}
.materials-section-end h2 {
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 22px;
  color: #D4A04A;
}
.materials-section-end > p {
  color: #9B8E7E;
  font-size: 15px;
}
.materials-section-end .materials-info {
  text-align: left;
  max-width: 400px;
  margin: 24px auto;
}
.materials-section-end .materials-meta {
  margin-top: 24px;
}

/* 모바일 edge-to-edge */
@media (max-width: 639px) {
  .materials-header,
  .materials-body {
    border-left: none;
    border-right: none;
    box-shadow: none;
  }
  .materials-header {
    padding: 24px 16px;
    margin-left: -16px;
    margin-right: -16px;
  }
  .materials-body {
    margin-left: -16px;
    margin-right: -16px;
  }
  .materials-section {
    padding: 24px 16px;
  }
}

