/* ============================================
   곰쓰 쉬운 베이킹 - 스타일시트
   색상 팔레트: 로고 기반 따뜻한 톤
   ============================================ */

/* 기본 리셋 & 전체 설정 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brown-dark: #3D3028;
  --brown-main: #C4A882;
  --brown-light: #E8D5BE;
  --cream: #FAF7F4;
  --cream-deep: #F3EDE6;
  --cherry-red: #B83A3A;
  --white: #FFFFFF;
  --text-main: #2C2420;
  --text-sub: #8C7E72;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(61, 48, 40, 0.04);
  --shadow-md: 0 4px 20px rgba(61, 48, 40, 0.07);
  --shadow-lg: 0 8px 32px rgba(61, 48, 40, 0.10);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--cream);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================
   헤더 / 네비게이션
   ============================================ */
.header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(61, 48, 40, 0.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--brown-dark);
  letter-spacing: -0.3px;
}

.logo-text span {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-sub);
  display: block;
  letter-spacing: 0;
}

/* 네비게이션 */
.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  transition: all var(--transition);
}

.nav a:hover {
  background-color: var(--cream-deep);
  color: var(--text-main);
}

.nav a.active {
  background-color: var(--brown-dark);
  color: var(--white);
}

.nav a.nav-community {
  color: var(--cherry-red);
  font-weight: 600;
}

.nav a.nav-community:hover {
  background-color: #FFF0F0;
  color: var(--cherry-red);
}

/* 헤더 오른쪽 (검색 + 메뉴) */
.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: var(--cream-deep);
  color: var(--brown-dark);
}

/* 검색 오버레이 */
.search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  justify-content: center;
  padding-top: 80px;
}

.search-overlay.open {
  display: flex;
}

.search-box {
  width: 90%;
  max-width: 560px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  gap: 10px;
}

.search-icon-input {
  color: var(--text-sub);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.search-input-wrap input {
  flex: 1;
  border: none;
  font-size: 16px;
  outline: none;
  background: none;
  color: var(--text-main);
  font-family: inherit;
}

.search-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-sub);
  padding: 0 4px;
  line-height: 1;
}

.search-close:hover {
  color: var(--text-main);
}

.search-results {
  overflow-y: auto;
  padding: 8px;
  flex: 1;
}

.search-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-sub);
  font-size: 14px;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: var(--cream);
}

.search-result-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border-radius: 8px;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown-dark);
  margin-bottom: 2px;
}

.search-result-title mark {
  background: #FFF3C4;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.search-result-desc {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.search-result-meta {
  font-size: 11px;
  color: var(--brown-main);
  font-weight: 500;
}

.search-result-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--cream-deep);
  color: var(--text-sub);
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .search-overlay {
    padding-top: 20px;
  }
  .search-box {
    width: 95%;
    max-height: 80vh;
  }
}

/* 모바일 메뉴 버튼 */
.menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--brown-dark);
  padding: 6px 8px;
  cursor: pointer;
  cursor: pointer;
}

/* ============================================
   히어로 섹션 (메인 배너)
   ============================================ */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 32px 56px;
  text-align: center;
}

.hero-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
}

.hero-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 25px;
  font-weight: 800;
  color: var(--brown-dark);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.hero p {
  font-size: 17px;
  color: var(--text-sub);
  font-weight: 400;
}

.sub-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 24px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  border-radius: 40px;
}

.sub-count {
  font-size: 18px;
  font-weight: 800;
  color: var(--brown-dark);
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.sub-label {
  font-size: 14px;
  color: var(--text-sub);
  font-weight: 500;
}

.hero-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 28px;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-youtube {
  background-color: var(--cherry-red);
  color: var(--white);
}

.btn-youtube:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(184, 58, 58, 0.3);
}

.btn-instagram {
  background-color: var(--brown-dark);
  color: var(--white);
}

.btn-instagram:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(61, 48, 40, 0.25);
}

/* ============================================
   공통 섹션 타이틀
   ============================================ */
.section-title {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 20px;
  font-size: 22px;
  font-weight: 700;
  color: var(--brown-dark);
  letter-spacing: -0.3px;
}

/* ============================================
   유튜브 영상 섹션
   ============================================ */
.yt-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 56px;
}

.yt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.yt-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.yt-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.yt-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--cream-deep);
}

.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all var(--transition);
}

.yt-card:hover .yt-thumb img {
  opacity: 0;
  transform: scale(1.05);
}

.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(184, 58, 58, 0.9);
  border-radius: 50%;
  color: var(--white);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  transition: all var(--transition);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(184, 58, 58, 0.3);
}

.yt-card:hover .yt-play {
  opacity: 0;
}

.yt-iframe-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.yt-card:hover .yt-iframe-wrap {
  opacity: 1;
}

.yt-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.yt-title {
  padding: 14px 18px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
}

/* ============================================
   최신 업로드 섹션
   ============================================ */
.news-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 56px;
  position: relative;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.news-list::-webkit-scrollbar {
  display: none;
}

.news-item {
  flex: 0 0 300px;
  min-width: 0;
}

.news-list {
  gap: 16px;
}

.news-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(61, 48, 40, 0.12);
  background: var(--white);
  color: var(--brown-dark);
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s;
}

.news-arrow:hover {
  background: var(--brown-dark);
  color: var(--white);
}

.news-arrow-left {
  left: 8px;
}

.news-arrow-right {
  right: 8px;
}
  gap: 28px;
}

.news-item a {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.news-item a:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.news-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-cream) 0%, #f0e6d6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-item a:hover .news-img-wrap img {
  transform: scale(1.05);
}

.news-body {
  padding: 20px 24px 24px;
}

.news-category {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}

.badge-ingredient { background: #FFF0E0; color: #B87A3D; }
.badge-tool { background: #E8F4E8; color: #4A8B4A; }
.badge-recipe { background: #FFE8E8; color: var(--cherry-red); }
.badge-tip { background: #E8E4FF; color: #6B5CB8; }
.badge-substitute { background: #E0F0FF; color: #3D7AB8; }
.badge-buy { background: #FFF5E0; color: #B8893A; }

.news-body h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-body p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 0;
}

.news-date {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 12px;
  font-weight: 400;
}

/* ============================================
   카테고리 그리드 (메인)
   ============================================ */
.categories {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid rgba(61, 48, 40, 0.04);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.category-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

.category-card p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.5;
}

.category-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 5px 12px;
  background-color: var(--cream);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 500;
  transition: all var(--transition);
}

.category-card:hover .tag {
  background-color: var(--cream-deep);
}

/* ============================================
   서브페이지 공통
   ============================================ */
.page-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 32px 28px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--brown-dark);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.page-header p {
  font-size: 15px;
  color: var(--text-sub);
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--brown-main);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* 사이드바 + 메인 콘텐츠 레이아웃 */
.content-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 56px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* 사이드바 바로가기 (스크롤 고정) */
.sidebar-nav {
  position: sticky;
  top: 64px;
  width: 200px;
  min-width: 200px;
  flex-shrink: 0;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
}

.sidebar-nav-inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quick-nav-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.sidebar-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  transition: all var(--transition);
}

.sidebar-nav a.active {
  background: var(--brown-dark);
  color: var(--white);
  font-weight: 600;
}

/* 앵커 이동 시 헤더에 가리지 않도록 오프셋 */
.sub-card[id] {
  scroll-margin-top: 140px;
}

/* 소카테고리 목록 (썸네일 카드) */
.sub-categories {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.sub-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(61, 48, 40, 0.06);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  padding: 14px 17px 17px;
}

.sub-card-thumb {
  padding: 14px 14px 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: none;
  border-bottom: none;
}

.sub-card-thumb .sub-icon {
  font-size: 20px;
  margin-bottom: 0;
}

.sub-card-thumb h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--brown-dark);
  margin: 0;
}

.sub-card-body {
  padding: 6px 17px 17px;
  max-width: 800px;
}

.sub-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

.sub-card p {
  font-size: 15.5px;
  color: var(--text-sub);
  line-height: 1.9;
  margin-top: 10px;
  word-break: keep-all;
}

.sub-card h4 {
  margin-top: 22px;
  margin-bottom: 4px;
  padding-bottom: 6px;
  font-size: 17px;
  color: var(--brown-dark);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.sub-card ul {
  margin-top: 16px;
  padding-left: 20px;
}

.sub-card .point-box {
  margin-top: 24px;
}

.card-meta {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 13px;
  color: var(--text-muted, #999);
  text-align: right;
}

.sub-card li {
  font-size: 15.5px;
  color: var(--text-sub);
  line-height: 1.9;
  margin-bottom: 14px;
  word-break: keep-all;
}

.sub-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

/* 도구 사진 번호 오버레이 */
.tool-photo-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 18px 0 10px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.tool-photo-wrap img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.tool-marker {
  position: absolute;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
  line-height: 1;
  z-index: 2;
}

@media (max-width: 600px) {
  .tool-marker {
    min-width: 16px;
    height: 16px;
    padding: 0 2px;
    font-size: 8px;
  }
}

/* 구매처 링크 스타일 */
.shop-link {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  background: var(--cream);
  border-radius: 8px;
  font-size: 12px;
  color: var(--brown-main);
  font-weight: 500;
}

/* 테이블 스타일 */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14.5px;
  line-height: 1.7;
}

.info-table th {
  background: var(--cream);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--brown-dark);
  border-bottom: 2px solid var(--brown-light);
}

.info-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cream-deep);
  color: var(--text-sub);
}

/* 중요 포인트 박스 */
.point-box {
  background: var(--cream);
  border-left: 4px solid var(--brown-main);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 24px;
  margin-top: 20px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-main);
  word-break: keep-all;
}

/* 추천 레벨 별표 */
.stars {
  color: var(--brown-main);
  font-size: 12px;
}

/* ============================================
   틀 변환 계산기
   ============================================ */
.converter-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.converter-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid rgba(61, 48, 40, 0.04);
}

.converter-card:hover {
  box-shadow: var(--shadow-md);
}

.converter-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 12px;
}

.converter-sub {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.converter-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.converter-col {
  flex: 1;
}

.converter-col label {
  display: block;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 6px;
  font-weight: 500;
}

.converter-col select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-main);
  background: var(--cream);
  cursor: pointer;
  transition: border-color var(--transition);
}

.converter-col select:focus {
  outline: none;
  border-color: var(--brown-main);
}

.converter-arrow {
  padding-top: 32px;
  font-size: 24px;
  color: var(--brown-main);
  font-weight: 700;
}

.converter-result {
  margin-top: 20px;
  text-align: center;
  padding: 24px;
  background: var(--cream);
  border-radius: var(--radius-md);
}

.result-ratio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.result-label {
  font-size: 13px;
  color: var(--text-sub);
}

.result-value {
  font-size: 40px;
  font-weight: 800;
  color: var(--cherry-red);
}

.result-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-main);
}

/* 재료 계산기 */
.calc-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc-quantity-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(61, 48, 40, 0.04);
  flex-wrap: wrap;
}

.calc-qty-box label {
  display: block;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 6px;
  font-weight: 500;
}

.calc-qty-input {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-qty-input input {
  width: 80px;
  padding: 10px 12px;
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
  background: var(--cream);
}

.calc-qty-input input:focus {
  outline: none;
  border-color: var(--brown-main);
}

.calc-qty-input span {
  font-size: 14px;
  color: var(--text-sub);
}

.calc-qty-arrow {
  font-size: 24px;
  color: var(--brown-main);
  font-weight: 700;
}

.calc-ratio-equals {
  font-size: 24px;
  color: var(--brown-main);
  font-weight: 700;
}

.calc-ratio-box {
  margin-left: 0;
  text-align: center;
}

.calc-ratio-label {
  display: block;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.calc-ratio-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--cherry-red);
}

.calc-ingredients {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(61, 48, 40, 0.04);
  padding: 28px;
}

.calc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream-deep);
}

.calc-row:last-child {
  border-bottom: none;
}

.calc-row-header {
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 600;
  padding-bottom: 8px;
}

.calc-col-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  padding-left: 30px;
}

.calc-col-arrow {
  font-size: 14px;
  color: var(--brown-main);
  font-weight: 700;
  flex-shrink: 0;
}

.calc-row-example .calc-col-name,
.calc-row-example .calc-unit,
.calc-row-example .calc-col-arrow,
.calc-row-example .calc-result-value {
  color: var(--text-sub);
  opacity: 0.6;
}

.calc-col-amount {
  width: 140px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 10px;
}

.calc-amount-input {
  width: 70px;
  padding: 8px 10px;
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-main);
  text-align: right;
  background: var(--cream);
}

.calc-amount-input:focus {
  outline: none;
  border-color: var(--brown-main);
}

.calc-unit {
  font-size: 13px;
  color: var(--text-sub);
  min-width: 24px;
}

.calc-col-result {
  width: 160px;
  text-align: left;
}

.calc-result-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--cherry-red);
}

.calc-col-del {
  width: 32px;
  text-align: center;
}

.calc-del-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-sub);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  transition: all var(--transition);
}

.calc-del-btn:hover {
  color: var(--cherry-red);
  background: #fef2f2;
}

.calc-add-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(61, 48, 40, 0.04);
  padding: 28px;
}

.calc-add-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calc-add-row select {
  flex: 1;
  padding: 12px 14px;
  padding-right: 28px;
  border: 1.5px solid var(--brown-main);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-main);
  appearance: none;
  -webkit-appearance: none;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C7E72' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  cursor: pointer;
  font-weight: 500;
}

.calc-add-row select:focus {
  outline: none;
  border-color: var(--brown-dark);
}

.calc-reset-btn {
  padding: 10px 20px;
  background: var(--brown-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.calc-reset-btn:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .converter-row {
    flex-direction: column;
    gap: 12px;
  }

  .converter-arrow {
    padding-top: 0;
    text-align: center;
    transform: rotate(90deg);
  }

  .result-value {
    font-size: 28px;
  }

  .calc-wrap {
    gap: 16px;
    padding: 0 12px;
    margin-bottom: 40px;
  }

  /* ── 수량 설정 영역 ── */
  .calc-quantity-row {
    flex-wrap: nowrap;
    gap: 6px;
    padding: 20px 16px;
    align-items: center;
    justify-content: center;
    padding-left: 0;
  }

  .calc-qty-box {
    flex-shrink: 0;
    text-align: center;
  }

  .calc-qty-arrow,
  .calc-ratio-equals {
    font-size: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    align-self: flex-end;
    margin-bottom: 6px;
  }

  .calc-qty-box label {
    font-size: 13px;
    margin-bottom: 4px;
    transform: translateX(-10%);
  }

  .calc-qty-input {
    justify-content: center;
  }

  .calc-qty-input input {
    width: 68px;
    padding: 7px 4px;
    font-size: 16px;
  }

  .calc-qty-input span {
    font-size: 13px;
  }

  .calc-ratio-box {
    margin-left: 0;
    flex-shrink: 0;
    text-align: center;
  }

  .calc-ratio-label {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .calc-ratio-value {
    font-size: 20px;
    padding: 6px 14px;
    background: var(--cream);
    border-radius: var(--radius-sm);
  }

  /* ── 재료 목록 ── */
  .calc-ingredients {
    padding: 20px 16px;
  }

  .calc-add-card {
    padding: 20px 16px;
  }

  .calc-row-header {
    display: none;
  }

  .calc-row:not(.calc-row-header) {
    flex-wrap: nowrap;
    padding: 8px 0;
    gap: 8px;
  }

  .calc-col-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 20px;
  }

  .calc-col-arrow {
    font-size: 12px;
    flex-shrink: 0;
  }

  .calc-col-amount {
    width: auto;
    flex-shrink: 0;
    margin-right: 6px;
  }

  .calc-amount-input {
    width: 56px;
    padding: 7px 6px;
    font-size: 14px;
  }

  .calc-unit {
    font-size: 12px;
    min-width: 18px;
  }

  .calc-col-result {
    width: auto;
    flex-shrink: 0;
    text-align: right;
  }

  .calc-result-value {
    font-size: 14px;
  }

  .calc-col-del {
    width: 28px;
    flex-shrink: 0;
  }

  .calc-del-btn {
    font-size: 16px;
    padding: 2px 6px;
  }

  /* ── 재료 추가 & 초기화 ── */
  .calc-add-row {
    gap: 8px;
  }

  .calc-add-row select {
    flex: 1;
    font-size: 14px;
    padding: 10px 10px;
    min-width: 0;
  }

  .calc-reset-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
}

/* ============================================
   틀 변환 내 재료 계산기
   ============================================ */
.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 12px;
}

.converter-card .calc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream-deep);
}

.converter-card .calc-row:last-child {
  border-bottom: none;
}

.converter-card .calc-name {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  padding: 0;
  border: none;
  background: none;
}

.converter-card .calc-amount {
  width: 76px;
  padding: 8px 10px;
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-main);
  background: var(--cream);
  font-family: inherit;
  text-align: right;
}

.converter-card .calc-amount:focus {
  outline: none;
  border-color: var(--brown-main);
}

.calc-unit-label {
  font-size: 14px;
  color: var(--text-sub);
  flex-shrink: 0;
}

.calc-result-val {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--cherry-red);
  text-align: left;
  padding-left: 10px;
}

.converter-card .calc-row-example .calc-name,
.converter-card .calc-row-example .calc-unit-label,
.converter-card .calc-row-example .calc-result-val {
  color: var(--text-sub);
  opacity: 0.6;
}

.calc-row-del {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-sub);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  transition: all var(--transition);
  flex-shrink: 0;
}

.calc-row-del:hover {
  color: var(--cherry-red);
  background: #fef2f2;
}

.conv-calc-add {
  display: flex;
  align-items: center;
  gap: 8px;
}

.conv-calc-add select {
  flex: 1;
  padding: 10px 28px 10px 12px;
  border: 1.5px solid var(--brown-main);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-main);
  appearance: none;
  -webkit-appearance: none;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C7E72' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}

.conv-calc-add select:focus {
  outline: none;
  border-color: var(--brown-dark);
}

.conv-reset-btn {
  padding: 10px 16px;
  background: var(--brown-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}

.conv-reset-btn:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .converter-card .calc-row {
    gap: 8px;
    padding: 8px 0;
  }

  .converter-card .calc-name {
    font-size: 14px;
  }

  .converter-card .calc-amount {
    width: 66px;
    padding: 7px 8px;
    font-size: 14px;
  }

  .calc-unit-label {
    font-size: 13px;
  }

  .calc-result-val {
    font-size: 14px;
  }

  .calc-row-del {
    font-size: 16px;
    padding: 2px 6px;
  }

  .conv-calc-add select {
    font-size: 14px;
    padding: 10px 28px 10px 12px;
  }

  .conv-reset-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
}

/* ============================================
   푸터
   ============================================ */
.footer {
  background-color: var(--brown-dark);
  color: var(--brown-light);
  text-align: center;
  padding: 40px 32px;
  font-size: 13px;
  line-height: 2;
}

.footer a {
  color: var(--brown-main);
  transition: color var(--transition);
}

.footer a:hover {
  color: var(--white);
}

/* ============================================
   반응형 - 태블릿 (1024px 이하)
   ============================================ */
@media (max-width: 1024px) {
  .categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .yt-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   반응형 - 모바일 (768px 이하)
   ============================================ */
@media (max-width: 768px) {
  .header-inner {
    padding: 12px 20px;
  }

  .menu-btn {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 12px 20px 16px;
    box-shadow: var(--shadow-md);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 16px;
    border-radius: var(--radius-md);
  }

  .hero {
    padding: 40px 20px 36px;
  }

  .hero h1 {
    font-size: 18px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-links a {
    padding: 10px 22px;
    font-size: 13px;
  }

  .section-title {
    padding: 0 20px 16px;
    font-size: 20px;
  }

  .yt-section {
    padding: 0 20px 40px;
  }

  .yt-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .yt-title {
    padding: 10px 14px 12px;
    font-size: 13px;
  }

  .news-section {
    padding: 0 16px 40px;
  }

  .news-item {
    flex: 0 0 260px;
  }

  .news-arrow {
    display: none;
  }

  .categories {
    grid-template-columns: 1fr;
    padding: 0 20px 48px;
    gap: 12px;
  }

  .category-card {
    padding: 24px 20px;
  }

  .content-layout {
    flex-direction: column;
    padding: 0 0 40px;
  }

  .sidebar-nav {
    position: sticky;
    top: 68px;
    width: 100%;
    min-width: 0;
    z-index: 90;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    max-height: none;
    overflow-y: visible;
  }

  .sidebar-nav-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 14px 20px;
    border-radius: 0;
    scrollbar-width: none;
  }

  .sidebar-nav-inner::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav a {
    padding: 8px 16px;
    font-size: 14.4px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .quick-nav-label {
    display: none;
  }

  .sub-categories {
    padding: 0 20px;
  }

  .page-header {
    padding: 28px 20px 20px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .quick-nav {
    padding: 0 20px 16px;
  }

  .footer {
    padding: 32px 20px;
  }

  .recipe-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .recipe-card {
    flex-direction: column !important;
  }

  .recipe-thumb-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }

  .recipe-info {
    padding: 10px !important;
    gap: 5px !important;
  }

  .recipe-title {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  .recipe-desc {
    font-size: 11px !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .recipe-tags {
    gap: 3px !important;
  }

  .recipe-tag {
    padding: 2px 8px !important;
    font-size: 10.5px !important;
  }

  .recipe-yt-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 12px !important;
  }
}

/* ============================================
   레시피 필터 바 (드롭다운)
   ============================================ */

.filter-bar {
  background: var(--white);
  border-bottom: 1px solid rgba(61, 48, 40, 0.08);
  padding: 12px 0;
  position: sticky;
  top: 74px;
  z-index: 90;
}

.recipe-content-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 40px;
}

.recipe-yt-banner {
  text-align: center;
  padding: 32px 0 0;
}

.filter-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-dropdown {
  position: relative;
}

.filter-dd-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 1px solid rgba(61, 48, 40, 0.15);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-dd-btn:hover {
  border-color: var(--brown-main);
}

.filter-dd-btn.has-filter {
  background: var(--brown-dark);
  border-color: var(--brown-dark);
}

.filter-dd-btn.has-filter .filter-dd-label,
.filter-dd-btn.has-filter .filter-dd-value,
.filter-dd-btn.has-filter .filter-dd-arrow {
  color: var(--white);
}

.filter-dd-label {
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 500;
}

.filter-dd-value {
  font-size: 13px;
  color: var(--brown-dark);
  font-weight: 600;
}

.filter-dd-arrow {
  font-size: 11px;
  color: var(--text-sub);
  transition: transform 0.2s;
}

.filter-dropdown.open .filter-dd-arrow {
  transform: rotate(180deg);
}

.filter-dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 160px;
  background: var(--white);
  border: 1px solid rgba(61, 48, 40, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 6px;
  z-index: 100;
}

.filter-dropdown.open .filter-dd-menu {
  display: block;
  animation: ddFadeIn 0.15s ease;
}

@keyframes ddFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-opt {
  display: block;
  width: 100%;
  padding: 9px 14px;
  border: none;
  border-radius: 8px;
  background: none;
  font-size: 13.5px;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.filter-opt:hover {
  background: var(--cream);
}

.filter-opt.active {
  background: var(--cream-deep);
  font-weight: 600;
  color: var(--brown-dark);
}

.filter-result {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--brown-main);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .filter-bar {
    padding: 10px 0;
    top: 68px;
  }
  .recipe-content-wrap {
    padding: 16px 16px 32px;
  }
  .filter-bar-inner {
    padding: 0 16px;
    gap: 6px;
  }
  .filter-dd-btn {
    padding: 7px 10px;
    gap: 3px;
  }
  .filter-dd-label {
    font-size: 11px;
  }
  .filter-dd-value {
    font-size: 12px;
  }
  .filter-dd-menu {
    min-width: 140px;
  }
  .filter-opt {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* ============================================
   레시피 카드 스타일
   ============================================ */

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.recipe-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(61, 48, 40, 0.06);
  transition: var(--transition);
}

.recipe-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.recipe-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--cream-deep);
  flex-shrink: 0;
}

.recipe-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recipe-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-sub);
  background: var(--cream-deep);
}

.recipe-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.recipe-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brown-dark);
  margin: 0;
  border-bottom: none;
}

.recipe-desc {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.6;
  margin: 0;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recipe-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.tag-초급 {
  background: #E8F5E9;
  color: #2E7D32;
}

.tag-중급 {
  background: #FFF3E0;
  color: #E65100;
}

.tag-고급 {
  background: #FCE4EC;
  color: #C62828;
}

.tag-time {
  background: var(--cream-deep);
  color: var(--text-sub);
}

.recipe-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 8px;
}

.recipe-yt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  color: var(--text-sub);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: var(--transition);
}

.recipe-yt-btn:hover {
  background: rgba(0,0,0,0.05);
  color: var(--brown-dark);
}

.recipe-yt-btn-disabled {
  background: var(--cream-deep);
  color: var(--text-sub);
  cursor: default;
}

.recipe-yt-btn-disabled:hover {
  background: var(--cream-deep);
  color: var(--text-sub);
}
