/* ═══════════════════════════════════════════════════════
   MOA RECIPE - 메인 CSS v1.0
   ═══════════════════════════════════════════════════════ */

/* ── 1. CSS 변수 ─────────────────────────────────────── */
:root {
  --mr-bg:       #f8f5f0;
  --mr-surface:  #ffffff;
  --mr-surface2: #f0ebe3;
  --mr-border:   #e2d9cf;
  --mr-text:     #1a1208;
  --mr-muted:    #6b5e52;
  --mr-primary:  #f97316;
  --mr-primary2: #ea6800;
  --mr-accent:   #ef4444;
  --mr-green:    #16a34a;
  --mr-hdr-h:    58px;
  --mr-pad:      20px;
  --mr-radius:   12px;
  --mr-shadow:   0 4px 24px rgba(0,0,0,.12);
}
[data-mr-theme="dark"] {
  --mr-bg:       #0f1117;
  --mr-surface:  #1a1d26;
  --mr-surface2: #22263a;
  --mr-border:   #2e3248;
  --mr-text:     #e8eaf0;
  --mr-muted:    #7a7f99;
  --mr-primary2: #fb923c;
  --mr-shadow:   0 4px 24px rgba(0,0,0,.5);
}
@media (max-width: 767px) {
  :root { --mr-hdr-h:52px; --mr-pad:14px; }
}

/* ── 2. 기본 리셋 ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--mr-bg);
  color: var(--mr-text);
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* ── 3. 헤더 ─────────────────────────────────────────── */
.mr-header {
  position: sticky; top: 0; z-index: 900;
  height: var(--mr-hdr-h);
  background: rgba(248,245,240,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mr-border);
}
[data-mr-theme="dark"] .mr-header {
  background: rgba(15,17,23,.92);
  border-bottom-color: #2e3248;
}
.mr-header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 var(--mr-pad);
  height: 100%;
  display: flex; align-items: center; gap: 16px;
}
.mr-logo {
  font-size: 1.1rem; font-weight: 800;
  color: var(--mr-primary); white-space: nowrap;
  flex-shrink: 0;
}
.mr-nav {
  display: flex; align-items: center; gap: 4px;
  flex: 1;
}
.mr-nav a {
  padding: 6px 10px; border-radius: 8px;
  font-size: .875rem; font-weight: 500;
  white-space: nowrap; transition: background .15s, color .15s;
}
.mr-nav a:hover, .mr-nav a.active { background: var(--mr-surface2); color: var(--mr-primary); }
.mr-nav-adm { color: var(--mr-primary2) !important; }
.mr-nav-divider { width: 1px; height: 18px; background: var(--mr-border); margin: 0 4px; }
.mr-theme-btn { padding: 5px 10px; border-radius: 8px; font-size: .75rem; font-weight:700;
  flex-shrink:0; border: 1px solid var(--mr-border); background: var(--mr-surface2);
  color: var(--mr-muted); transition: background .15s; }
.mr-theme-btn:hover { background: var(--mr-border); }
.mr-nav-toggle { display: none; padding: 6px 12px; border-radius: 8px;
  font-size: .8rem; font-weight:700; flex-shrink:0;
  border: 1px solid var(--mr-border); background: var(--mr-surface2); }

@media (max-width: 767px) {
  .mr-nav-toggle { display: block; }
  .mr-nav {
    display: none; position: absolute; top: var(--mr-hdr-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--mr-surface);
    border-bottom: 1px solid var(--mr-border);
    padding: 8px var(--mr-pad) 16px;
    z-index: 800;
  }
  .mr-nav.open { display: flex; }
  .mr-nav a { padding: 10px 12px; font-size: .9rem; }
  .mr-nav-divider { width: 100%; height: 1px; margin: 4px 0; }
}
@media (min-width: 768px) and (max-width: 1000px) {
  .mr-nav a { font-size: .8rem; padding: 6px 7px; }
}

/* ── 4. 레이아웃 래퍼 ────────────────────────────────── */
.mr-wrap {
  max-width: 1280px; margin: 0 auto;
  padding: 28px var(--mr-pad) 80px;
}
@media (max-width: 479px) { .mr-wrap { padding-top: 18px; } }

/* ── 5. 히어로 배너 ──────────────────────────────────── */
.mr-hero {
  border-radius: var(--mr-radius);
  background: linear-gradient(135deg, #7c2d12 0%, #c2410c 40%, #f97316 100%);
  padding: 40px var(--mr-pad);
  margin-bottom: 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  overflow: hidden; position: relative;
}
.mr-hero::before {
  content:'🍳'; font-size: 120px; position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%) rotate(-10deg); opacity: .15; pointer-events: none;
}
.mr-hero-title { font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 900; color: #fff; }
.mr-hero-sub   { margin-top: 8px; font-size: .95rem; color: rgba(255,255,255,.8); }
.mr-hero-cta   { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
@media (max-width: 479px) { .mr-hero { padding: 28px 16px; } }

/* ── 6. 섹션 타이틀 ──────────────────────────────────── */
.mr-section-title {
  font-size: 1.15rem; font-weight: 800;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.mr-section-more, .mr-section-sub {
  margin-left: auto; font-size: .8rem; font-weight: 500;
  color: var(--mr-primary); opacity: .8;
  text-decoration: none;
}
.mr-section-more:hover, .mr-section-sub:hover { opacity: 1; }

/* ── 7. 카테고리 탭 ──────────────────────────────────── */
.mr-tabs-outer {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  /* 화살표 버튼 포함한 flex */
  display: flex;
  align-items: center;
  gap: 6px;
}
.mr-tabs-arrow {
  flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--mr-surface2); border: 1px solid var(--mr-border);
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s;
  z-index: 1;
}
.mr-tabs-arrow:hover:not(.disabled) { background: var(--mr-primary); color: #fff; border-color: var(--mr-primary); }
.mr-tabs-arrow.disabled { opacity: .3; pointer-events: none; }

/* 탭 스크롤 핵심 구조 */
.mr-tabs {
  /* flex 자식으로서 남은 공간 차지 */
  flex: 1;
  /* 가로 스크롤 핵심 - min-width:0 없으면 flex가 늘어남 */
  min-width: 0;
  width: 0;           /* ← grid/flex 안에서 넘침 완전 방지 */
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 10px; /* 하단 스크롤바 공간 */
  /* 얇은 스크롤바 스타일 */
  scrollbar-width: thin;
  scrollbar-color: var(--mr-border) transparent;
}
.mr-tabs::-webkit-scrollbar {
  height: 4px;
}
.mr-tabs::-webkit-scrollbar-track {
  background: transparent;
}
.mr-tabs::-webkit-scrollbar-thumb {
  background: var(--mr-border);
  border-radius: 4px;
}
.mr-tabs::-webkit-scrollbar-thumb:hover {
  background: var(--mr-primary);
}

.mr-tab {
  flex-shrink: 0;
  padding: 7px 14px; border-radius: 20px;
  font-size: .85rem; font-weight: 600;
  background: var(--mr-surface2); border: 1px solid var(--mr-border);
  transition: all .15s; white-space: nowrap;
  cursor: pointer;
}
.mr-tab:hover  { border-color: var(--mr-primary); color: var(--mr-primary); }
.mr-tab.active { background: var(--mr-primary); border-color: var(--mr-primary); color: #fff; }

/* 모바일 */
@media (max-width: 767px) {
  .mr-tabs-arrow { display: none; }
  .mr-tabs {
    padding: 4px 4px 8px;
    /* 모바일에서는 스크롤바 더 얇게 */
    scrollbar-width: thin;
  }
  .mr-tab { padding: 6px 12px; font-size: .8rem; }
}
@media (max-width: 479px) {
  .mr-tab { padding: 5px 10px; font-size: .78rem; }
}

/* ── 8. 레시피 카드 그리드 ───────────────────────────── */
.mr-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px; margin-bottom: 28px;
}
@media (max-width: 767px) { .mr-card-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap:12px; } }
@media (max-width: 479px) { .mr-card-grid { grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap:10px; } }

.mr-card {
  background: var(--mr-surface); border-radius: var(--mr-radius);
  border: 1px solid var(--mr-border); overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.mr-card:hover {
  transform: translateY(-4px); box-shadow: var(--mr-shadow);
  border-color: var(--mr-primary);
}
.mr-card-thumb {
  position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--mr-surface2);
}
.mr-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.mr-card:hover .mr-card-thumb img { transform: scale(1.06); }
.mr-card-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35); opacity: 0; transition: opacity .2s;
}
.mr-card:hover .mr-card-play { opacity: 1; }
.mr-card-play-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--mr-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.mr-card-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--mr-primary); color: #fff;
  font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 10px;
}
.mr-card-time {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,.72); color: #fff;
  font-size: .72rem; padding: 2px 6px; border-radius: 4px;
}
.mr-card-body {
  padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 4px;
}
.mr-card-title {
  font-size: .875rem; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mr-card-chef  { font-size: .75rem; color: var(--mr-muted); }
.mr-card-meta  { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.mr-card-diff  { font-size: .7rem; color: var(--mr-primary); font-weight: 600; }
.mr-card-stat  { font-size: .7rem; color: var(--mr-muted); display: flex; align-items: center; gap: 3px; }

/* ── 9. TOP 10 랭킹 리스트 ───────────────────────────── */
.mr-top10-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.mr-top10-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--mr-surface); border: 1px solid var(--mr-border);
  border-radius: var(--mr-radius); padding: 12px 14px;
  transition: border-color .15s, transform .2s;
  cursor: pointer;
}
.mr-top10-item:hover { border-color: var(--mr-primary); transform: translateX(3px); }
.mr-top10-rank {
  font-size: 1.3rem; font-weight: 900; min-width: 30px; text-align: center;
  color: var(--mr-muted);
}
.mr-top10-rank.top3 { color: var(--mr-primary); font-size: 1.5rem; }
.mr-top10-thumb {
  width: 72px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.mr-top10-info { flex: 1; min-width: 0; }
.mr-top10-title {
  font-size: .9rem; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mr-top10-chef  { font-size: .75rem; color: var(--mr-muted); margin-top: 2px; }
.mr-top10-right { flex-shrink: 0; text-align: right; }
.mr-top10-stat  { font-size: .75rem; color: var(--mr-muted); }
.mr-top10-play  {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--mr-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
  transition: transform .15s;
}
.mr-top10-item:hover .mr-top10-play { transform: scale(1.1); }

/* ── 10. 홈 2단 그리드 ───────────────────────────────── */
.mr-home-grid {
  display: grid; grid-template-columns: 1fr 1.8fr; gap: 32px; margin-bottom: 36px;
}
/* grid 자식이 넘치지 않도록 */
.mr-home-grid > * { min-width: 0; }
@media (max-width: 767px) { .mr-home-grid { grid-template-columns: 1fr; } }

/* ── 11. 셰프 카드 ───────────────────────────────────── */
.mr-chef-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 479px) { .mr-chef-grid { grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap:10px; } }

.mr-chef-card {
  background: var(--mr-surface); border: 1px solid var(--mr-border);
  border-radius: var(--mr-radius); padding: 20px 16px;
  text-align: center; transition: border-color .15s, transform .2s;
}
.mr-chef-card:hover { border-color: var(--mr-primary); transform: translateY(-3px); }
.mr-chef-avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 10px; border: 3px solid var(--mr-border);
}
.mr-chef-avatar-placeholder {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--mr-surface2); margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; border: 3px solid var(--mr-border);
}
.mr-chef-name    { font-size: .9rem; font-weight: 700; margin-bottom: 4px; }
.mr-chef-cat     { font-size: .75rem; color: var(--mr-primary); font-weight: 600; }
.mr-chef-recipes { font-size: .72rem; color: var(--mr-muted); margin-top: 4px; }

/* ── 12. 레시피 상세 ─────────────────────────────────── */
.mr-detail-hero {
  display: grid; grid-template-columns: 340px 1fr; gap: 32px;
  margin-bottom: 32px; align-items: start;
}
@media (max-width: 767px) { .mr-detail-hero { grid-template-columns: 1fr; } }

.mr-detail-thumb {
  border-radius: var(--mr-radius); overflow: hidden; aspect-ratio: 16/9;
  background: var(--mr-surface2); cursor: pointer; position: relative;
}
.mr-detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mr-detail-thumb-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35); transition: background .2s;
}
.mr-detail-thumb:hover .mr-detail-thumb-overlay { background: rgba(0,0,0,.5); }
.mr-detail-play-btn {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--mr-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.mr-detail-info h1 { font-size: clamp(1.2rem,3vw,1.7rem); font-weight: 900; margin-bottom: 10px; }
.mr-detail-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.mr-detail-meta-item { display: flex; flex-direction: column; gap: 2px; }
.mr-detail-meta-label { font-size: .7rem; color: var(--mr-muted); text-transform: uppercase; letter-spacing: .05em; }
.mr-detail-meta-val   { font-size: .9rem; font-weight: 700; }
.mr-detail-desc { font-size: .875rem; color: var(--mr-muted); line-height: 1.6; margin-bottom: 16px; }
.mr-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── 13. 재료 박스 ───────────────────────────────────── */
.mr-ingredients {
  background: var(--mr-surface); border: 1px solid var(--mr-border);
  border-radius: var(--mr-radius); padding: 20px; margin-bottom: 24px;
}
.mr-ingredients-title { font-weight: 800; margin-bottom: 12px; font-size: 1rem; }
.mr-ingredients-body  { font-size: .875rem; line-height: 1.8; color: var(--mr-text); white-space: pre-wrap; }

/* ── 14. 버튼 ────────────────────────────────────────── */
.mr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 10px; font-size: .875rem; font-weight: 700;
  transition: opacity .15s, transform .1s; white-space: nowrap;
}
.mr-btn:hover { opacity: .88; }
.mr-btn:active { transform: scale(.97); }
.mr-btn-primary { background: var(--mr-primary); color: #fff; }
.mr-btn-ghost   { background: transparent; border: 1.5px solid var(--mr-border); color: var(--mr-text); }
.mr-btn-ghost:hover { border-color: var(--mr-primary); color: var(--mr-primary); }
.mr-btn-danger  { background: #ef4444; color: #fff; }
.mr-btn-sm  { padding: 7px 14px; font-size: .8rem; border-radius: 8px; }
.mr-btn-xs  { padding: 4px 10px; font-size: .75rem; border-radius: 6px; }
.mr-btn-like { font-size: 1rem; padding: 8px 16px; border-radius: 20px;
  background: var(--mr-surface2); border: 1.5px solid var(--mr-border); }
.mr-btn-like.liked { background: #fee2e2; border-color: #ef4444; color: #ef4444; }
[data-mr-theme="dark"] .mr-btn-like.liked { background: #3f1515; }

/* ── 15. 입력 폼 ─────────────────────────────────────── */
.mr-input, .mr-select, .mr-textarea {
  width: 100%; padding: 10px 14px; border-radius: 10px;
  background: var(--mr-surface); border: 1.5px solid var(--mr-border);
  font-size: .875rem; transition: border-color .2s;
}
.mr-input:focus, .mr-select:focus, .mr-textarea:focus {
  outline: none; border-color: var(--mr-primary);
}
.mr-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.mr-form-group { margin-bottom: 18px; }
.mr-form-label { display: block; font-size: .8rem; font-weight: 700;
  color: var(--mr-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.mr-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 599px) { .mr-form-row { grid-template-columns: 1fr; } }
.mr-form-hint { font-size: .75rem; color: var(--mr-muted); margin-top: 5px; }

/* ── 16. YouTube 모달 ────────────────────────────────── */
.mr-video-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
}
.mr-video-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.82);
}
.mr-video-box {
  position: relative; width: min(900px, 96vw);
  background: var(--mr-surface); border-radius: 16px;
  overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.7);
  display: flex; flex-direction: column;
}
.mr-video-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--mr-border); gap: 12px;
}
.mr-video-title { font-weight: 800; font-size: 1rem; }
.mr-video-chef  { font-size: .8rem; color: var(--mr-muted); margin-top: 2px; }
.mr-video-close {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--mr-surface2); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.mr-video-close:hover { background: #ef4444; color: #fff; }
.mr-video-screen {
  position: relative; aspect-ratio: 16/9; background: #000;
}
.mr-video-screen > div { position: absolute; inset: 0; }
.mr-video-screen iframe { width: 100%; height: 100%; }
.mr-video-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; gap: 12px; flex-wrap: wrap;
}
.mr-video-info { font-size: .8rem; color: var(--mr-muted); }
.mr-hidden { display: none !important; }

/* ── 17. 별점 ────────────────────────────────────────── */
.mr-stars { color: #f59e0b; font-size: .95rem; letter-spacing: 1px; }
.mr-rating-input { display: flex; gap: 2px; flex-direction: row-reverse; justify-content: flex-end; margin: 4px 0; }
.mr-rating-input input { display: none; }
.mr-rating-input label {
  font-size: 1.8rem; cursor: pointer;
  color: #d1d5db; /* 기본: 회색 */
  transition: color .1s;
  line-height: 1;
  padding: 0 2px;
}
/* 호버: 현재 라벨과 그 오른쪽(= 더 낮은 숫자) 모두 노란색 */
.mr-rating-input label:hover,
.mr-rating-input label:hover ~ label { color: #f59e0b; }
/* 선택된 라디오 이후의 라벨(row-reverse이므로 시각적으로 왼쪽) 노란색 */
.mr-rating-input input:checked ~ label { color: #f59e0b; }

/* ── 18. 댓글 ────────────────────────────────────────── */
.mr-comment-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.mr-comment-item {
  background: var(--mr-surface); border: 1px solid var(--mr-border);
  border-radius: var(--mr-radius); padding: 14px 16px;
}
.mr-comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mr-comment-nick { font-size: .875rem; font-weight: 700; }
.mr-comment-dt   { font-size: .72rem; color: var(--mr-muted); margin-left: auto; }
.mr-comment-body { font-size: .875rem; line-height: 1.6; }

/* ── 19. 셰프 상세 ───────────────────────────────────── */
.mr-chef-hero {
  display: flex; align-items: flex-start; gap: 28px;
  background: var(--mr-surface); border: 1px solid var(--mr-border);
  border-radius: var(--mr-radius); padding: 28px; margin-bottom: 32px;
}
@media (max-width: 599px) { .mr-chef-hero { flex-direction: column; padding: 20px; } }
.mr-chef-hero-img {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--mr-primary); flex-shrink: 0;
}
.mr-chef-hero-placeholder {
  width: 120px; height: 120px; border-radius: 50%; flex-shrink: 0;
  background: var(--mr-surface2); border: 4px solid var(--mr-primary);
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
}
.mr-chef-hero-name { font-size: 1.6rem; font-weight: 900; }
.mr-chef-hero-sub  { font-size: .875rem; color: var(--mr-primary); font-weight: 600; margin: 4px 0; }
.mr-chef-hero-desc { font-size: .85rem; color: var(--mr-muted); line-height: 1.6; }
.mr-chef-badges    { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mr-chef-badge {
  padding: 4px 12px; border-radius: 12px; font-size: .75rem; font-weight: 600;
  background: var(--mr-surface2); border: 1px solid var(--mr-border);
}

/* ── 20. 마이페이지 탭 컨텐츠 ────────────────────────── */
.mr-bookmark-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  gap: 16px; margin-bottom: 28px;
}
@media (max-width: 479px) { .mr-bookmark-grid { grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap:10px; } }

/* ── 21. 셰프 스튜디오 ───────────────────────────────── */
.mr-studio-wrap {
  max-width: 720px;
}
.mr-recipe-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--mr-surface); border: 1px solid var(--mr-border);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 8px;
  transition: border-color .15s;
}
.mr-recipe-row:hover { border-color: var(--mr-border); }
.mr-recipe-row-thumb {
  width: 72px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.mr-recipe-row-info { flex: 1; min-width: 0; }
.mr-recipe-row-title { font-size: .875rem; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-recipe-row-meta  { font-size: .75rem; color: var(--mr-muted); margin-top: 3px; }
.mr-status-badge {
  display: inline-block; padding: 3px 9px; border-radius: 10px;
  font-size: .7rem; font-weight: 700;
}
.mr-status-0 { background: #fef3c7; color: #92400e; }
.mr-status-1 { background: #d1fae5; color: #065f46; }
.mr-status-2 { background: #fee2e2; color: #991b1b; }
[data-mr-theme="dark"] .mr-status-0 { background: #3d2b00; color: #fbbf24; }
[data-mr-theme="dark"] .mr-status-1 { background: #052e16; color: #4ade80; }
[data-mr-theme="dark"] .mr-status-2 { background: #3f1515; color: #f87171; }

/* ── 22. 관리자 ──────────────────────────────────────── */
.mr-adm-wrap { max-width: 1100px; }
.mr-stats-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-bottom: 28px;
}
@media (min-width: 480px)  { .mr-stats-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 768px)  { .mr-stats-grid { grid-template-columns: repeat(4,1fr); } }
@media (min-width: 1024px) { .mr-stats-grid { grid-template-columns: repeat(6,1fr); } }

.mr-stat-card {
  background: var(--mr-surface); border: 1px solid var(--mr-border);
  border-radius: var(--mr-radius); padding: 16px; text-align: center;
}
.mr-stat-num   { font-size: 1.6rem; font-weight: 900; color: var(--mr-primary); }
.mr-stat-label { font-size: .75rem; color: var(--mr-muted); margin-top: 4px; }

.mr-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px; }
.mr-table {
  width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 360px;
}
.mr-table th {
  background: var(--mr-surface2); padding: 10px 12px; text-align: left;
  font-size: .75rem; font-weight: 700; color: var(--mr-muted);
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  border-bottom: 1px solid var(--mr-border);
}
.mr-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--mr-border); vertical-align: middle;
}
.mr-table tr:last-child td { border-bottom: none; }
.mr-table tr:hover td { background: var(--mr-surface2); }

/* ── 23. 검색 바 ─────────────────────────────────────── */
.mr-search-bar {
  display: flex; gap: 8px; margin-bottom: 24px;
  background: var(--mr-surface); border: 1.5px solid var(--mr-border);
  border-radius: 12px; padding: 6px 12px; align-items: center;
}
.mr-search-bar:focus-within { border-color: var(--mr-primary); }
.mr-search-bar input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: .9rem; padding: 6px 0;
}
.mr-search-bar button { background: var(--mr-primary); color: #fff;
  padding: 7px 16px; border-radius: 8px; font-size: .85rem; font-weight: 600; }

/* ── 24. 알림 / 공백 메시지 ──────────────────────────── */
.mr-alert {
  padding: 12px 16px; border-radius: 10px; font-size: .875rem;
  margin-bottom: 16px;
}
.mr-alert-ok   { background: #d1fae5; color: #065f46; }
.mr-alert-err  { background: #fee2e2; color: #991b1b; }
[data-mr-theme="dark"] .mr-alert-ok  { background: #052e16; color: #4ade80; }
[data-mr-theme="dark"] .mr-alert-err { background: #3f1515; color: #f87171; }
.mr-empty {
  text-align: center; padding: 48px 20px;
  color: var(--mr-muted); font-size: .9rem;
}
.mr-empty::before { content:'🍽️'; display: block; font-size: 2.5rem; margin-bottom: 12px; }

/* ── 25. 페이지네이션 ────────────────────────────────── */
.mr-pagination { text-align: center; margin: 28px 0 8px; }
.mr-pagination ul { display: inline-flex; gap: 4px; list-style: none; flex-wrap: wrap; justify-content: center; }
.mr-pagination li a {
  display: flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 6px;
  border-radius: 8px; font-size: .85rem;
  border: 1px solid var(--mr-border); background: var(--mr-surface);
  transition: all .15s;
}
.mr-pagination li a:hover { border-color: var(--mr-primary); color: var(--mr-primary); }
.mr-pagination li.active a { background: var(--mr-primary); border-color: var(--mr-primary); color: #fff; font-weight: 700; }
.mr-pagination li.dots a  { border-color: transparent; background: transparent; pointer-events: none; }

/* ── 26. 유틸리티 ────────────────────────────────────── */
.mr-flex-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mr-gap-sm { gap: 8px; }
.mr-mt-sm  { margin-top: 12px; }
.mr-mt-md  { margin-top: 20px; }
.mr-divider { border: none; border-top: 1px solid var(--mr-border); margin: 28px 0; }
.mr-tag {
  display: inline-block; padding: 3px 10px; border-radius: 10px;
  font-size: .72rem; font-weight: 600;
  background: var(--mr-surface2); border: 1px solid var(--mr-border);
  color: var(--mr-muted); transition: color .15s;
}
.mr-tag:hover { color: var(--mr-primary); border-color: var(--mr-primary); }
