/* ============================================================
   Radical Brewing Club — Styles
   Inspired by dgng.co: clean, minimal, editorial
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poor+Story&family=Nanum+Myeongjo:wght@400;700&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=array@400&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=comico@400&display=swap');

:root {
  --black: #111111;
  --dark: #222222;
  --mid: #666666;
  --light: #999999;
  --border: #e8e8e8;
  --bg: #ffffff;
  --bg-subtle: #e8e3d8;
  --accent: #c8571a;   /* warm coffee-brick orange */
  --selling: #2d7a4f;  /* green for 판매중 */

  --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-mono: "SF Mono", "Fira Code", monospace;

  --header-h: 72px;
  --max-w: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── HEADER ─────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(240,236,228,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  min-height: var(--header-h);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  font-size: 16px;
  font-weight: 700;
  font-family: 'Comico', var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  white-space: nowrap;
}

nav {
  display: flex;
  gap: 0;
  flex: 1;
}

nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  padding: 4px 0;
  margin: 0 28px 0 0;
  transition: color 0.15s;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

nav a:hover, nav a.active {
  color: var(--black);
}

/* ── HAMBURGER ──────────────────────────────────────────────── */
.btn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.btn-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 1px;
  transform-origin: center;
  transition: transform 0.22s ease, opacity 0.18s ease, width 0.22s ease;
}

/* 열렸을 때도 햄버거 그대로 유지 */

/* ── MOBILE NAV ─────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(240,236,228,0.98);
  backdrop-filter: blur(12px);
  z-index: 99;
  padding: 40px var(--gutter);
  flex-direction: column;
  gap: 0;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  padding: 20px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: opacity 0.15s;
}

.mobile-nav a:first-child {
  border-top: 1px solid rgba(0,0,0,0.08);
}

.mobile-nav a:hover { opacity: 0.5; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 8px;
  }

  .btn-hamburger {
    display: flex;
    grid-column: 1;
    grid-row: 1;
  }

  .logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rbc-auth-badge {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin-right: 0;
    max-width: 100%;
  }

  .btn-mypage {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
  }

  nav {
    display: none;
  }
}

.btn-mypage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.15s, transform 0.15s;
}

.btn-mypage:hover, .btn-mypage.active {
  opacity: 1;
  transform: rotate(-4deg);
}

.btn-mypage.active:hover {
  transform: rotate(-4deg) scale(1.1);
}

.btn-mypage img {
  display: block;
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0);
}

/* 로그인 시 다이어리 아이콘 우하단에 올라가는 프로필 배지 */
.btn-mypage-profile-badge {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #b5865a;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #f0ece4;
  pointer-events: none;
}

/* ── 헤더 로그인 배지 ───────────────────────────── */
.rbc-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px 4px 4px;
  background: transparent;
  color: var(--mid);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 4px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s;
}
.rbc-auth-badge:not(.logged-in) {
  padding: 5px 10px;
}
.rbc-auth-badge-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #ddd;
  color: #333;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.rbc-auth-badge.logged-in .rbc-auth-badge-avatar {
  border: 1.5px solid #fff;
}
.rbc-auth-badge-nick {
  overflow: hidden;
  text-overflow: ellipsis;
}
.rbc-auth-badge:hover {
  color: var(--black);
  border-color: var(--black);
}
.rbc-auth-badge.logged-in {
  background: var(--black);
  color: #fff;
  border-color: var(--black);
}
.rbc-auth-badge.logged-in:hover {
  background: #333;
  border-color: #333;
}
@media (max-width: 600px) {
  .rbc-auth-badge {
    font-size: 11px;
    padding: 4px 8px;
    max-width: 90px;
  }
}

.btn-subscribe {
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  background: var(--black);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-subscribe:hover { background: var(--dark); }

/* ── LANDING ─────────────────────────────────────────────────── */
.landing {
  display: flex;
  flex-direction: row;
  min-height: calc(100vh - 60px);
}

.landing-left {
  flex: 0 0 28%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
}

.landing-divider {
  flex: 0 0 30px;
  background: linear-gradient(to bottom, #FFE0C8, #F07030);
  align-self: stretch;
}

.landing-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  padding: 20px 40px 20px 20px;
}

.landing-right img {
  width: 80%;
  flex: 1;
  object-fit: cover;
  display: block;
  min-height: 0;
}

@media (max-width: 768px) {
  .landing-right {
    padding: 20px 43px 20px 20px;
  }
  .landing-right img {
    width: 100%;
  }
}

/* ── HERO (home) ────────────────────────────────────────────── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px var(--gutter) 64px;
}

.hero-label {
  font-size: 13px;
  color: var(--light);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 17px;
  color: var(--mid);
  line-height: 1.7;
  max-width: 460px;
}

/* ── PAGE HERO ──────────────────────────────────────────────── */
.page-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px var(--gutter) 40px;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--black);
}

.page-hero p {
  font-size: 16px;
  color: var(--mid);
}

/* ── SECTION ────────────────────────────────────────────────── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px var(--gutter);
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--black);
}

.see-all {
  font-size: 13px;
  color: var(--mid);
  transition: color 0.15s;
}
.see-all:hover { color: var(--black); }

/* ── PAGE CONTENT ───────────────────────────────────────────── */
.page-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px var(--gutter) 80px;
}

/* ── COFFEE GRID ────────────────────────────────────────────── */
.coffee-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.coffee-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.coffee-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  background: white;
  position: relative;
}

.coffee-card:hover {
  border-color: #ccc;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}

.coffee-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--selling);
  background: #e8f5ee;
  padding: 3px 8px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.coffee-card-badge::before { content: "●"; font-size: 7px; }

.coffee-card-year {
  font-size: 11px;
  color: var(--light);
  margin-bottom: 6px;
}

.coffee-card-roastery {
  font-size: 12px;
  color: var(--mid);
  margin-bottom: 4px;
  font-weight: 500;
}

.coffee-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.coffee-card-note {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.5;
  margin-bottom: 12px;
  min-height: 20px;
}

.coffee-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.coffee-tag {
  font-size: 11px;
  color: var(--mid);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 8px;
}

.coffee-tag.country {
  color: var(--accent);
  background: #fdf1ec;
}

.sticker-flavor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.flavor-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 0;
  opacity: 0.75;
}
.flavor-tag + .flavor-tag::before {
  content: ' · ';
  color: #aaa;
}
.flavor-tag.fruity { color: #c0392b; }
.flavor-tag.floral { color: #7b6fa0; }
.flavor-tag.nutty  { color: #7b4f2e; }

/* ── ADMIN ──────────────────────────────────────────────────── */
.admin-bar {
  background: #1a1a2e;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.admin-bar button {
  font-size: 12px;
  font-family: var(--font-sans);
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.admin-toggle-btn {
  font-size: 13px;
  background: none;
  border: none;
  color: var(--light);
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.4;
  transition: opacity 0.15s;
}

.admin-toggle-btn:hover { opacity: 1; }

.coffee-card-admin {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.coffee-admin-btn {
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-sans);
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: white;
  color: var(--mid);
  transition: all 0.15s;
}

.coffee-admin-btn:hover { color: var(--black); border-color: #bbb; }
.coffee-admin-btn.delete:hover { color: #e53e3e; border-color: #e53e3e; background: #fff5f5; }

.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-checkbox input { width: auto; }
.admin-checkbox label { margin: 0; }

/* ── YEAR SECTIONS ──────────────────────────────────────────── */
.year-section {
  margin-bottom: 0;
  border-top: 1px solid var(--border);
  padding-top: 40px;
  padding-bottom: 48px;
}

.year-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.year-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.year-section.archive .year-section-header {
  margin-bottom: 0;
  justify-content: flex-start;
  gap: 16px;
}

.year-section.archive .coffee-grid.collapsible {
  margin-top: 28px;
}

.year-section.archive .archive-list {
  margin-top: 24px;
}

.toggle-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-btn:hover .year-num {
  opacity: 0.6;
}

.year-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.year-dot {
  width: 8px;
  height: 8px;
  background: var(--selling);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.year-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--black);
  transition: opacity 0.15s;
}

.year-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--selling);
  background: #e8f5ee;
  padding: 3px 10px;
  border-radius: 10px;
}

.year-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.year-count {
  font-size: 13px;
  color: var(--light);
}

.toggle-icon {
  font-size: 20px;
  font-weight: 300;
  color: var(--mid);
  width: 28px;
  text-align: center;
  transition: transform 0.2s;
}

.toggle-icon.open {
  transform: rotate(180deg);
}

/* ── FILTER BAR ─────────────────────────────────────────────── */
.filter-bar {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  background: white;
  z-index: 90;
}

.filter-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 6px;
  height: 52px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-inner::-webkit-scrollbar { display: none; }

.filter-btn {
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--mid);
  background: none;
  border: 1px solid transparent;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.filter-btn:hover { color: var(--black); background: var(--bg-subtle); }

.filter-btn.active {
  color: var(--black);
  border-color: var(--black);
  background: none;
}

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 2px;
}

.filter-select {
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--mid);
  background: none;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.coffee-count {
  font-size: 13px;
  color: var(--light);
  margin-bottom: 20px;
}

/* ── STORIES GRID ───────────────────────────────────────────── */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stories-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.story-card {
  padding: 24px;
  border-radius: 12px;
  background: var(--bg-subtle);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.story-card:hover {
  background: #f0efed;
  transform: translateY(-2px);
}

.story-card-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.story-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 8px;
}

.story-card-excerpt {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 16px;
}

.story-card-date {
  font-size: 12px;
  color: var(--light);
}

/* ── SUBSCRIBE SECTION ──────────────────────────────────────── */
.subscribe-section {
  background: var(--black);
  color: white;
}

.subscribe-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px var(--gutter);
  text-align: center;
}

.subscribe-inner h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.subscribe-inner p {
  font-size: 16px;
  color: #aaa;
  margin-bottom: 32px;
  line-height: 1.7;
}

.subscribe-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}

.subscribe-form input {
  flex: 1;
  font-size: 15px;
  font-family: var(--font-sans);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  padding: 12px 16px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s;
}

.subscribe-form input::placeholder { color: #777; }
.subscribe-form input:focus { border-color: rgba(255,255,255,0.4); }

.subscribe-form button {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  background: white;
  color: var(--black);
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.subscribe-form button:hover { opacity: 0.85; }

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px var(--gutter);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

footer .logo {
  white-space: normal;
  font-size: 14px;
  line-height: 1.2;
  flex: 1 1 auto;
  min-width: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--light);
  flex-shrink: 0;
}

.footer-links a:hover { color: var(--black); }

/* 의견 보내기 버튼 — footer 링크와 동일한 톤 */
.footer-feedback-btn {
  font-size: 13px;
  color: var(--light);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: inherit;
  transition: color 0.15s;
}
.footer-feedback-btn:hover { color: var(--black); }

@media (max-width: 480px) {
  footer { padding: 22px var(--gutter); }
  footer .logo { font-size: 12px; letter-spacing: 0.06em; }
  .footer-links { font-size: 12px; gap: 14px; }
  .footer-feedback-btn { font-size: 12px; }
}

/* ── Feedback Modal ─────────────────────────────────────── */
.feedback-modal {
  max-width: 440px;
  padding: 28px 28px 24px;
}

.feedback-modal h3 {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  color: var(--black);
}

.feedback-form textarea {
  width: 100%;
  min-height: 140px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--black);
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
.feedback-form textarea::placeholder { color: var(--light); }
.feedback-form textarea:focus {
  outline: none;
  border-color: var(--black);
  background: #fff;
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.feedback-btn-secondary,
.feedback-btn-primary {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, background 0.15s;
}

.feedback-btn-secondary {
  background: #f2f2f2;
  color: var(--mid);
}
.feedback-btn-secondary:hover { background: #e8e8e8; color: var(--black); }

.feedback-btn-primary {
  background: var(--black);
  color: #fff;
}
.feedback-btn-primary:hover { opacity: 0.9; }
.feedback-btn-primary:disabled {
  background: #e0e0e0;
  color: #b0b0b0;
  cursor: not-allowed;
  opacity: 1;
}

@media (max-width: 480px) {
  .feedback-modal { padding: 24px 20px 20px; }
  .feedback-modal h3 { font-size: 17px; }
}

/* 관리자 전용 의견함 버튼 — footer 톤, admin 특유의 subtle 강조 */
.footer-feedback-admin-btn {
  font-size: 13px;
  color: var(--mid);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: inherit;
  transition: color 0.15s;
}
.footer-feedback-admin-btn:hover { color: var(--black); }
@media (max-width: 480px) {
  .footer-feedback-admin-btn { font-size: 12px; }
}

/* ── Feedback Admin Modal (의견함) ───────────────────────── */
.feedback-admin-modal {
  max-width: 560px;
  padding: 28px 28px 20px;
}

.feedback-admin-modal h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--black);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.feedback-admin-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--light);
}

.feedback-admin-list {
  max-height: 60vh;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

.feedback-admin-empty {
  font-size: 13px;
  color: var(--light);
  text-align: center;
  padding: 40px 0;
  margin: 0;
}

.feedback-admin-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 14px 10px;
  margin-bottom: 10px;
  background: #fff;
}
.feedback-admin-item:last-child { margin-bottom: 0; }

.feedback-admin-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.feedback-admin-who {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
a.feedback-admin-who:hover { border-bottom-color: var(--black); }
.feedback-admin-who--anon { color: var(--mid); font-weight: 600; }

.feedback-admin-time {
  font-size: 11px;
  color: var(--light);
  font-variant-numeric: tabular-nums;
}

.feedback-admin-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--black);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 480px) {
  .feedback-admin-modal { padding: 24px 18px 16px; }
  .feedback-admin-modal h3 { font-size: 18px; }
  .feedback-admin-item { padding: 12px 12px 10px; }
}

/* ── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}
#collect-record-modal-overlay,
#rating-modal-overlay {
  z-index: 9200;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: white;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--black);
}

.modal p {
  font-size: 14px;
  color: var(--mid);
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal .subscribe-form input {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: var(--black);
}

.modal .subscribe-form input::placeholder { color: var(--light); }
.modal .subscribe-form input:focus { border-color: var(--black); }
.modal .subscribe-form button { background: var(--black); color: white; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 20px;
  color: var(--light);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close:hover { color: var(--black); }

/* ── COFFEE MODAL ───────────────────────────────────────────── */
.coffee-modal {
  max-width: 880px;
  padding: 0;
  overflow: hidden;
}

/* ── Coffee Modal 2-column layout ── */
.coffee-modal-layout {
  display: flex;
  min-height: 0;
}

.coffee-modal-left {
  width: 300px;
  flex-shrink: 0;
  padding: 40px 24px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: #f7f7f7;
  border-right: 1.5px solid #111;
  border-radius: 16px 0 0 16px;
}

.coffee-modal-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1.5px solid #111;
}

.coffee-modal-image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #efefef;
  border: 1.5px solid #111;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.coffee-modal-image-initial {
  font-size: 52px;
  font-weight: 800;
  color: #111;
  line-height: 1;
  letter-spacing: -0.04em;
}

.coffee-modal-image-roastery {
  font-size: 11px;
  color: var(--mid);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.coffee-modal-right {
  flex: 1;
  padding: 40px 32px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  max-height: 85vh;
  background: #fff;
  border-radius: 0 16px 16px 0;
}

.coffee-modal-header-info {
  margin-bottom: 20px;
  padding-right: 28px;
}

.coffee-modal-section {
  border-top: 1.5px solid #111;
  padding-top: 18px;
  margin-top: 32px;
}

.coffee-modal-section:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.coffee-modal-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.coffee-modal-comment-count {
  background: #1a1a1a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  letter-spacing: 0;
}
.coffee-modal-section-title--row {
  justify-content: space-between;
  margin-bottom: 16px;
}
.coffee-modal-write-btn {
  font-size: 11px;
  color: var(--accent);
  background: none;
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 3px 10px;
  cursor: pointer;
  font-family: var(--font-sans);
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  transition: background 0.15s, color 0.15s;
}
.coffee-modal-write-btn:hover { background: var(--accent); color: #fff; }
.coffee-modal-write-btn--done {
  color: #888;
  border-color: #bbb;
  background: #f5f1ec;
  cursor: default;
  opacity: 0.9;
}
.coffee-modal-write-btn--done:hover { background: #f5f1ec; color: #888; }
.coffee-modal-admin-btns { display: flex; gap: 6px; }
.coffee-modal-delete-btn {
  color: #e53e3e;
  border-color: #e53e3e;
}
.coffee-modal-delete-btn:hover { background: #e53e3e; color: #fff; }

/* 코멘트 작성 인라인 폼 */
.coffee-write-form {
  background: #f8f6f2;
  border: 1px solid #e8e3dc;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.coffee-write-rating-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.coffee-write-chip {
  font-size: 12px;
  padding: 5px 10px;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-family: var(--font-sans);
  color: #666;
  transition: all 0.15s;
}
.coffee-write-chip.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.coffee-write-memo {
  width: 100%;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--font-sans);
  resize: vertical;
  outline: none;
  background: #fff;
  color: #111;
  box-sizing: border-box;
}
.coffee-write-memo:focus { border-color: var(--accent); }
.coffee-write-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.coffee-write-cancel {
  font-size: 13px;
  color: #999;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  font-family: var(--font-sans);
}
.coffee-write-submit {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  cursor: pointer;
  font-family: var(--font-sans);
}
.coffee-write-submit:hover { background: #b04a15; }

/* ── Team Comments ── */
.coffee-modal-team {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.coffee-modal-team-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.coffee-modal-team-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 48px;
  text-decoration: none;
}

.coffee-modal-team-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid #111;
  background: #111;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.coffee-modal-team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coffee-modal-team-name {
  font-size: 10px;
  color: var(--mid);
  margin-top: 5px;
  text-align: center;
  font-weight: 500;
}

/* 클릭 가능한 프로필 닉네임에만 밑줄 표기 (a 태그일 때만) */
a.coffee-modal-team-face .coffee-modal-team-name {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.coffee-modal-team-face--inert {
  cursor: default;
}

/* Profile edit modal — 공개 범위 (radio) */
/* `.form-group label { display: block }` 보다 specificity 높여야 함 */
.profile-edit-visibility-wrap {
  margin-top: 6px;
}
.form-group label.profile-edit-section-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}
.profile-edit-radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label.profile-edit-radio-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s, background 0.15s;
}
.form-group label.profile-edit-radio-option:hover {
  border-color: #999;
}
.form-group label.profile-edit-radio-option:has(input:checked) {
  border-color: #111;
  background: #faf7f2;
}
.profile-edit-radio-option input[type="radio"] {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #111;
  flex-shrink: 0;
}
.profile-edit-radio-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.profile-edit-radio-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
}
.profile-edit-radio-desc {
  font-size: 11px;
  color: var(--light);
  line-height: 1.35;
}

.coffee-modal-team-bubble {
  flex: 1;
  background: #fff;
  border: 2px solid #111;
  border-radius: 3px 18px 16px 15px / 15px 16px 18px 3px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: 'Poor Story', cursive;
  color: #111;
  line-height: 1.7;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.coffee-modal-team-bubble::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 8px;
  width: 16px;
  height: 18px;
  background: #111;
  clip-path: polygon(100% 0%, 100% 100%, 0% 50%);
}

.coffee-modal-team-bubble::after {
  content: '';
  position: absolute;
  left: -13px;
  top: 11px;
  width: 13px;
  height: 12px;
  background: #fff;
  clip-path: polygon(100% 0%, 100% 100%, 0% 50%);
}

/* ── Reverse variant (member thoughts: profile right, tail right) ── */
.coffee-modal-team-item--reverse {
  flex-direction: row-reverse;
}

.coffee-modal-team-bubble--reverse {
  border-radius: 18px 3px 15px 16px / 16px 15px 3px 18px;
}

.coffee-modal-team-bubble--reverse::before {
  left: auto;
  right: -16px;
  clip-path: polygon(0% 0%, 0% 100%, 100% 50%);
}

.coffee-modal-team-bubble--reverse::after {
  left: auto;
  right: -13px;
  clip-path: polygon(0% 0%, 0% 100%, 100% 50%);
  background: #fff;
}

/* 내 버블도 일반 버블과 동일하게 흰 배경 유지 */

/* '나' 태그 — 꼬리 반대편 코너에 스티커처럼 부착 */
.bubble-mine-tag {
  position: absolute;
  top: -9px;
  right: 10px;          /* 기본 (팀 버블, 꼬리=좌) → 우상단 */
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--accent, #c8571a);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1.5px solid #111;
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.coffee-modal-team-bubble--reverse .bubble-mine-tag {
  right: auto;
  left: 10px;           /* 멤버 버블 (꼬리=우) → 좌상단 */
}

/* Mobile */
@media (max-width: 640px) {
  .coffee-modal-layout { flex-direction: column; }
  .coffee-modal-left {
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 28px 24px 20px;
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
  .coffee-modal-image,
  .coffee-modal-image-placeholder {
    width: 100px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
  }
  .coffee-modal-right {
    padding: 20px 20px 24px;
    max-height: none;
  }
  .coffee-modal-header-info { padding-right: 0; }
}

.coffee-modal-country {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.coffee-modal-roastery {
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 4px;
}

.coffee-modal-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--black);
  line-height: 1.3;
  margin-bottom: 0;
}

.coffee-modal-number {
  color: var(--light);
  font-size: 14px;
  font-weight: 600;
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.coffee-modal-note {
  font-size: 14px;
  color: #111;
  background: #f7f7f7;
  border: 1.5px solid #111;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.coffee-modal-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.coffee-modal-detail {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.coffee-modal-detail-label {
  font-size: 11px;
  color: var(--mid);
  font-weight: 500;
  flex-shrink: 0;
  width: 52px;
}

.coffee-modal-detail-value {
  font-size: 12px;
  font-weight: 600;
  color: #111;
}

.coffee-modal-selling-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #8a4a1f;
  background: #f5ece0;
  padding: 6px 14px;
  border-radius: 20px;
  margin-top: 16px;
}

.coffee-modal-selling-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #8a4a1f;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── COFFEE MODAL REVIEWS ───────────────────────────────────── */
.coffee-modal-reviews {
  border-top: 1px solid var(--border);
  margin-top: 20px;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coffee-modal-reviews-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.coffee-modal-review-card {
  background: #f7f7f7;
  border: 1.5px solid #111;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.coffee-modal-review-card:last-child {
  margin-bottom: 0;
}

.coffee-modal-review-card--mine {
  background: #f0ece4;
  border-color: #111;
}

.review-mine-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.4;
  margin-left: 4px;
  flex-shrink: 0;
}

.coffee-modal-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.coffee-modal-review-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.coffee-modal-review-author-row:hover .coffee-modal-review-author {
  text-decoration: underline;
}

.coffee-modal-review-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.coffee-modal-review-avatar-fallback {
  background: var(--black);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coffee-modal-review-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}

.coffee-modal-review-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}

.coffee-modal-team-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}

.coffee-modal-team-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #b5865a;
}

.coffee-modal-team-date {
  font-size: 10px;
  color: var(--mid);
}

.coffee-modal-review-memo {
  font-size: 13px;
  color: var(--dark);
  line-height: 1.6;
  margin-bottom: 8px;
}

.coffee-modal-review-date {
  font-size: 11px;
  color: var(--light);
}

.coffee-modal-review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.coffee-modal-review-edit-btn {
  background: transparent;
  border: 1px solid #111;
  color: #111;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
}

.coffee-modal-review-edit-btn:hover {
  background: #111;
  color: #fff;
}

.coffee-modal-review-edit-btn--sm {
  font-size: 10px;
  padding: 3px 8px;
}

/* ── Delete Confirm Modal ─────────────────────────────────── */
#delete-coffee-confirm-overlay { z-index: 9999; }

.delete-confirm-modal {
  text-align: center;
  max-width: 380px;
  padding: 28px 24px 22px;
}

.delete-confirm-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.delete-confirm-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
  margin: 0 0 16px;
}

.delete-confirm-coffee {
  background: #f7f7f7;
  border: 1.5px solid #111;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  text-align: left;
}

.delete-confirm-coffee-no {
  font-size: 11px;
  font-weight: 700;
  color: var(--light);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.delete-confirm-coffee-name {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}

.delete-confirm-coffee-meta {
  font-size: 11px;
  color: var(--mid);
}

.delete-confirm-warning {
  font-size: 13px;
  color: #e53e3e;
  font-weight: 600;
  margin: 0 0 6px;
}

.delete-confirm-note {
  font-size: 11px;
  color: var(--mid);
  margin: 0 0 18px;
  line-height: 1.5;
}

.delete-confirm-actions {
  display: flex;
  gap: 8px;
}

.delete-confirm-actions .btn-secondary,
.delete-confirm-actions .btn-danger {
  flex: 1;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid #111;
  font-family: inherit;
}

.delete-confirm-actions .btn-secondary {
  background: #fff;
  color: #111;
}

.delete-confirm-actions .btn-secondary:hover {
  background: #f0f0f0;
}

.delete-confirm-actions .btn-danger {
  background: #e53e3e;
  color: #fff;
  border-color: #e53e3e;
}

.delete-confirm-actions .btn-danger:hover {
  background: #c53030;
  border-color: #c53030;
}

.coffee-modal-team-footer-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.coffee-modal-team-footer-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── PROFILE SECTION ─────────────────────────────────────── */
.profile-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: var(--bg-subtle);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--mid);
  flex-shrink: 0;
}

.profile-info h1 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 8px;
}

.btn-ghost-sm {
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-ghost-sm:hover {
  color: var(--dark);
  border-color: var(--dark);
}

.avatar-upload-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

#profile-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

/* ── LOG (도감) ─────────────────────────────────────────────── */
.coming-soon-banner {
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 48px;
  text-align: center;
  background: var(--bg-subtle);
}

.coming-soon-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: #fdf1ec;
  padding: 4px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.coming-soon-banner h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 10px;
}

.coming-soon-banner p {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.8;
  margin-bottom: 24px;
}

.analysis-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.analysis-chip {
  font-size: 13px;
  color: var(--dark);
  background: white;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
}

.log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.log-toolbar h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
}

.log-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--mid);
}

.log-empty p:first-child { font-size: 40px; margin-bottom: 12px; }
.log-empty p:nth-child(2) { font-size: 16px; color: var(--dark); margin-bottom: 4px; }
.log-empty-sub { font-size: 14px; margin-bottom: 24px; }

.btn-primary {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  background: var(--black);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s;
}

/* 관리자 전용 — 아카이브 상단 신규 생성 버튼 */
.admin-create-wrap {
  padding: 12px 24px 8px;
  display: flex;
  justify-content: flex-end;
}
.btn-create-coffee {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(200,87,26,0.25);
}
.btn-create-coffee:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary:hover { opacity: 0.8; }
.btn-primary.full-width { width: 100%; }

/* ── LOG FORM ───────────────────────────────────────────────── */
.log-modal {
  max-width: 480px;
}

/* ── DIARY MODAL ─────────────────────────────────────────────── */
.diary-modal {
  max-width: 700px;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  max-height: 92vh;
}

.diary-layout {
  display: flex;
  min-height: 480px;
}

/* 좌: 스티커 패널 */
.diary-left {
  width: 230px;
  flex-shrink: 0;
  background: #eddfd2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 20px;
  position: relative;
}

.diary-sticker-tilt {
  transform: rotate(-5deg);
  position: relative;
}

.diary-sticker-tilt .diary-mini-sticker {
  box-shadow: 4px 8px 18px rgba(0,0,0,0.22);
}

/* 테이프 효과 */
.diary-sticker-tilt::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 22px;
  background: rgba(255,255,255,0.52);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
  z-index: 2;
}

/* 미니 스티커 */
.diary-mini-sticker {
  width: 170px;
  background: #fff;
  border: 1.5px solid #111;
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-sans);
}

.diary-mini-band {
  height: 10px;
}

.diary-mini-body {
  padding: 10px 12px 12px;
}

.diary-mini-logo-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}

.diary-mini-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.diary-mini-abbr {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111;
  flex-shrink: 0;
}

.diary-mini-roastery-name {
  font-size: 10px;
  color: #999;
  font-weight: 500;
}

.diary-mini-coffee-name {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.diary-mini-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 8px;
  margin-bottom: 9px;
}

.diary-mini-meta-item {
  font-size: 11px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diary-mini-meta-label {
  font-weight: 500;
  color: #666;
  margin-right: 3px;
}

.diary-mini-note {
  font-size: 9px;
  color: #999;
  line-height: 1.5;
  border-top: 1px solid #eee;
  padding-top: 7px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 우: 기록 폼 패널 */
.diary-right {
  flex: 1;
  padding: 52px 26px 24px;
  background: #fefcf9;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.diary-right h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.diary-sub {
  font-size: 12px;
  color: var(--mid);
  margin-bottom: 18px !important;
}

.diary-written-at {
  font-size: 12px;
  color: var(--mid);
  margin: -6px 0 14px;
  letter-spacing: 0.02em;
}

.diary-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.diary-right > .form-group { margin-bottom: 18px; }
.diary-right > .form-group:last-of-type { margin-bottom: 0; }

.diary-row2 .form-group { margin-bottom: 0; }

.diary-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
  justify-content: center;
  align-items: center;
}

.rating-picker--sm .rating-chip {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 16px;
}

/* ── Review modal (diary-right): 질문 강조 · 답은 조용히 ── */
.diary-right .form-group label {
  font-size: 16px;
  font-weight: 700;
  color: #1d1510;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.diary-right .form-group input,
.diary-right .form-group select,
.diary-right .form-group textarea {
  /* iOS 자동 확대 방지 — 16px 이상 유지 */
  font-size: 16px;
  background: #fff;
  border: 1.5px solid #e0d4c4;
  border-radius: 10px;
  padding: 10px 12px;
}

.diary-right .btn-ghost-sm {
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #d6c8b6;
}

.diary-right .btn-primary,
.diary-right .btn-primary.full-width {
  width: auto;
  flex: 0 0 auto;
  border-radius: 22px;
  padding: 10px 44px;
  font-size: 14px;
  font-weight: 700;
  background: #3a2718;
  color: #f5efe6;
}

@media (max-width: 600px) {
  /* 모달 오버레이: 좌우 여백 살짝 줄이고 안전영역 반영 */
  .modal-overlay {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0));
    align-items: flex-start;
  }
  /* 작은 의견 모달은 중앙 정렬 유지 (상단 고정되면 어색) */
  #feedback-modal-overlay,
  #feedback-admin-modal-overlay {
    align-items: center;
  }
  /* 리뷰 모달: 모바일에선 모달이 아니라 전체화면 페이지처럼 동작 —
     overlay padding 제거하고 modal 을 뷰포트 전체로 확장 */
  #collect-record-modal-overlay,
  #rating-modal-overlay,
  #menu-review-modal-overlay {
    align-items: stretch;
    padding: 0;
    background: #fefcf9;
  }
  #collect-record-modal-overlay .diary-modal,
  #rating-modal-overlay .diary-modal,
  #menu-review-modal-overlay .diary-modal {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    /* 하단 safe-area 는 내부 actions padding 에서 반영 */
  }
  .diary-layout { flex-direction: column; min-height: auto; }
  /* 좁은 폭에서 누구랑/어떻게 2컬럼 그리드는 placeholder 가 잘려서
     세로로 쌓아 각 input 이 전체 폭을 쓰도록 변경 */
  .diary-row2 {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .diary-left {
    width: 100%;
    padding: 20px 20px 14px;
    min-height: 0;
  }
  .diary-modal {
    /* dvh: iOS URL 바 포함 vh 버그 회피 + safe-area 하단 인셋 반영 */
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0));
    /* 뷰포트 - overlay padding(12px*2) 만큼으로 폭 고정 → 가로 스크롤 방지 */
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow-y: auto;
    /* 모바일에선 스티커 회전을 제거했으므로 clip 해도 무방 — 가로 넘침 차단 */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* 모달 내부 스크롤이 페이지 스크롤로 전파되지 않도록 차단 */
    overscroll-behavior: contain;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    /* flex item이 콘텐츠 intrinsic width로 부풀어 뷰포트 초과하는 것 방지 */
    min-width: 0;
  }
  /* 우측 폼의 자식 중 intrinsic width가 큰 요소(예: iOS date input)가
     모달을 넓히지 않도록 flex/그리드 컨테이너에서 축소 허용 */
  .diary-right,
  .diary-right .form-group,
  .diary-row2 {
    min-width: 0;
  }
  .diary-right .form-group input,
  .diary-right .form-group select,
  .diary-right .form-group textarea {
    max-width: 100%;
  }
  /* iOS Safari: input[type="date"]는 기본 -webkit-appearance 에서 width:100%를
     무시하고 intrinsic 폭으로 렌더 → 모달을 넘겨 가로 클리핑 발생.
     appearance: none 으로 정규화하고 내부 value/indicator 정렬도 맞춤. */
  .diary-right .form-group input[type="date"],
  .diary-right .form-group input[type="time"],
  .diary-right .form-group input[type="datetime-local"] {
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px;
    text-align: left;
    display: block;
    width: 100%;
    min-width: 0;
  }
  .diary-right .form-group input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
    margin: 0;
  }
  .diary-right .form-group input[type="date"]::-webkit-calendar-picker-indicator {
    margin-left: 8px;
    opacity: 0.6;
  }
  /* 모바일에서 스티커 회전 제거: overflow-x:hidden 클리핑 방지 */
  .diary-sticker-tilt {
    transform: none;
  }
  /* 모바일에선 모달이 스크롤 컨테이너 → 우측 폼 자체 스크롤 제거 */
  .diary-right {
    overflow-y: visible;
    padding: 28px 20px 16px;
    flex: 1 1 auto;
  }
  /* 저장/삭제 버튼: 항상 모달 하단에 sticky 로 보이게 */
  .diary-actions {
    position: sticky;
    bottom: 0;
    background: #fefcf9;
    margin: 12px -20px 0;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0));
    border-top: 1px solid #f0e6d6;
    z-index: 2;
    gap: 12px;
  }
  .diary-right .btn-primary,
  .diary-right .btn-primary.full-width {
    flex: 1 1 auto;
    padding: 12px 24px;
  }
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.required-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f08a3c;
  margin-left: 4px;
  vertical-align: middle;
  transform: translateY(-4px);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  /* iOS Safari: input 이 16px 미만이면 포커스 시 자동 확대 → 모달 닫혀도 줌 유지됨. 반드시 16px 이상 유지. */
  font-size: 16px;
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--black);
}

.form-group textarea { resize: vertical; }

.rating-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rating-chip {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  transition: all 0.15s;
}

.rating-chip:hover { border-color: var(--black); }

.rating-chip.selected {
  background: var(--black);
  border-color: var(--black);
  color: white;
}

/* 리뷰 모달 안에서는 사이트 브랜드 컬러(accent)로 강조 */
#rating-modal-overlay .rating-chip.selected,
#collect-record-temp .rating-chip.selected,
#rating-modal-temp .rating-chip.selected,
#menu-review-temp .rating-chip.selected {
  background: #e8521a;
  border-color: #e8521a;
  color: white;
}
#rating-modal-overlay .rating-chip:hover:not(.selected),
#collect-record-temp .rating-chip:hover:not(.selected),
#rating-modal-temp .rating-chip:hover:not(.selected),
#menu-review-temp .rating-chip:hover:not(.selected) {
  border-color: #e8521a;
}

/* 메뉴 리뷰 모달 — 좌측 미니 카드 */
.menu-mini-card {
  background: white;
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 4px 8px 18px rgba(0,0,0,0.22);
  min-width: 160px;
  text-align: center;
}
.menu-mini-card__img {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  background: #f5efe6;
}
.menu-mini-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.menu-mini-card__img .pokedex-img-placeholder {
  padding: 12px 0;
}
.menu-mini-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  word-break: keep-all;
}

/* ── 커피잔 평점(1~4잔) ─────────────────────── */
.cup-rating {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.cup-rating__cups {
  display: flex;
  gap: 2px;
  align-items: flex-end;
}
.cup-rating__cup {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #e0d4c4;
  transition: color 0.15s ease, transform 0.15s ease;
}
.cup-rating__cup:hover { transform: translateY(-2px); }
.cup-rating__cup.filled { color: #e8521a; }
.cup-rating__icon {
  width: 28px;
  height: 28px;
  display: block;
}
.cup-rating__steam {
  opacity: 0;
  transform: translateY(4px);
  transform-origin: center bottom;
  transition: opacity 0.2s ease, transform 0.25s ease;
}
.cup-rating__cup.filled .cup-rating__steam {
  opacity: 1;
  transform: translateY(0);
}
.cup-rating__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--light);
  min-height: 1.2em;
  line-height: 1;
  padding-bottom: 6px;
  transition: color 0.15s ease;
}
.cup-rating__label.has-value {
  color: #e8521a;
  font-weight: 600;
}

.rating-cup-icon--sm {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  top: -2px;
  flex-shrink: 0;
  color: #b5865a;
}
.rating-chip.selected .rating-cup-icon--sm {
  color: white;
}

.rating-chip-pepe {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  display: inline-block;
}

/* ── SHAKE 애니메이션 (필수입력 미선택 시) ─────────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.shake { animation: shake 0.45s ease; }

/* ── LOG CARD ───────────────────────────────────────────────── */
.log-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  background: white;
  position: relative;
}

.log-card-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.log-card-btn {
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  background: white;
  color: var(--mid);
}

.log-card-btn:hover { color: var(--black); border-color: #bbb; }

.log-card-btn.delete:hover {
  color: #e53e3e;
  border-color: #e53e3e;
  background: #fff5f5;
}

.log-card-stars {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  background: var(--surface, #f5f5f5);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 10px;
}

.log-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.log-card-roastery {
  font-size: 12px;
  color: var(--mid);
  margin-bottom: 10px;
}

.log-card-memo {
  font-size: 13px;
  color: var(--dark);
  line-height: 1.6;
  margin-bottom: 10px;
}

.log-card-date {
  font-size: 12px;
  color: var(--light);
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --gutter: 16px; }

  .coffee-grid { grid-template-columns: 1fr 1fr; }
  .stories-grid { grid-template-columns: 1fr; }

  .hero { padding: 48px var(--gutter) 40px; }

  nav a:not(.active) { display: none; }

  .coming-soon-banner { padding: 24px; }

  .coffee-modal-details { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .coffee-grid { grid-template-columns: 1fr; }
  .subscribe-form { flex-direction: column; }
}

/* ============================================================
   TAB BAR (main.html)
   ============================================================ */

.top-tab-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.top-tab-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  gap: 4px;
  height: 48px;
  align-items: center;
}

.top-tab-btn {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--light);
  background: none;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  letter-spacing: -0.01em;
}

.top-tab-btn.active {
  color: var(--black);
  background: var(--bg-subtle);
}

.top-tab-btn:hover { color: var(--dark); }

/* Sub-tab bar */
.sub-tab-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.sub-tab-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  gap: 0;
  height: 44px;
  align-items: flex-end;
}

.sub-tab-btn {
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--light);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 16px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: -0.01em;
}

.sub-tab-btn.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

.sub-tab-btn:hover { color: var(--dark); }

/* Mypage 레이아웃: 헤더 고정, 나머지(프로필+탭바+콘텐츠) 스크롤, 탭바는 스크롤 내 sticky */
body.mypage-layout {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}
body.mypage-layout header {
  position: relative;
  top: auto;
  flex-shrink: 0;
}
body.mypage-layout .log-tab-bar {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 90;
}
.mypage-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Coffee 페이지 레이아웃: 헤더+탭바 고정, 콘텐츠만 스크롤 */
body.coffee-layout {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}
body.coffee-layout header {
  position: relative;
  top: auto;
  flex-shrink: 0;
}
body.coffee-layout .log-tab-bar {
  flex-shrink: 0;
  position: relative;
  top: auto;
}
.page-content-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
}

/* Log tab bar (log.html) */
.log-tab-bar {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  position: sticky;
  top: 56px;
  background: var(--bg);
  z-index: 90;
}

.log-tab-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  height: 44px;
  align-items: flex-end;
}

.log-tab-btn {
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--light);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 16px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.log-tab-btn.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

a.log-tab-btn {
  text-decoration: none;
  display: flex;
  align-items: flex-end;
  padding-bottom: 12px;
}

/* ── Pill View Switch ── */
.view-pill-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px var(--gutter) 4px;
}
.view-pill-switch {
  display: inline-flex;
  background: #f0ebe5;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.pill-btn {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  padding: 6px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  letter-spacing: 0.01em;
}
.pill-btn.active {
  background: var(--bg);
  color: var(--black);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* Sub tab bar (2단계 탭) */
.log-sub-tab-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 100px;
  z-index: 89;
}

body.coffee-layout .log-sub-tab-bar {
  position: relative;
  top: auto;
}

.log-sub-tab-bar .log-tab-bar-inner {
  height: 36px;
}

.log-sub-tab-bar .log-tab-btn {
  font-size: 12px;
  color: var(--light);
  padding: 0 14px 10px;
}

.log-sub-tab-bar .log-tab-btn.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

/* Tab panels */
.top-tab-panel,
.sub-tab-panel,
.log-tab-panel { display: block; }

/* Coming soon banner */
.coming-soon-panel {
  max-width: var(--max-w);
  margin: 80px auto;
  padding: 0 var(--gutter);
  text-align: center;
  color: var(--light);
  font-size: 15px;
}

.coming-soon-panel p {
  margin-top: 8px;
  font-size: 13px;
}

/* ============================================================
   FLAVOR CHART (산미/농도 그래프)
   ============================================================ */

.selling-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px var(--gutter) 0;
}

.selling-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 32px;
}

.flavor-chart-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.flavor-chart-outer {
  position: relative;
  width: 100%;
  max-width: 800px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chart-y-label {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  height: 320px;
  padding: 2px 0;
  flex-shrink: 0;
  width: 36px;
}

.chart-y-label span {
  font-size: 10px;
  color: #8a6a50;
  font-weight: 600;
  writing-mode: horizontal-tb;
}

.chart-y-title {
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-size: 10px;
  font-weight: 700;
  color: #6b4f35;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.flavor-chart {
  position: relative;
  flex: 1;
  max-width: 640px;
  height: 320px;
  background: var(--bg-subtle);
  overflow: visible;
}

/* 그리드 선 */
.flavor-chart::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: calc(100% / 7) calc(100% / 3);
  opacity: 0.6;
  pointer-events: none;
}

/* X축 선 - 오른쪽으로 돌출 후 화살표 */
.chart-axis-x-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: calc(100% + 22px);
  height: 1.5px;
  background: var(--light);
  pointer-events: none;
}

.chart-axis-x-line::after {
  content: '';
  position: absolute;
  right: -7px;
  top: -5px;
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--light);
}

/* Y축 선 - 위로 돌출 후 화살표 */
.chart-axis-y-line {
  position: absolute;
  top: -22px;
  left: 0;
  width: 1.5px;
  height: calc(100% + 22px);
  background: var(--light);
  pointer-events: none;
}

.chart-axis-y-line::after {
  content: '';
  position: absolute;
  top: -7px;
  left: -5px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 9px solid var(--light);
}

/* 농도 레이블 - Y축 가운데 */
.chart-axis-y-title {
  position: absolute;
  left: -32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--light);
  letter-spacing: 0.04em;
  white-space: nowrap;
  font-weight: 600;
}

.chart-dot {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.15s;
  z-index: 2;
}

.chart-dot:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.chart-dot-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6B3F1E;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.chart-dot-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* X axis labels */
.chart-x-wrap {
  width: 100%;
  max-width: 640px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.chart-x-wrap span {
  font-size: 10px;
  color: var(--light);
  font-weight: 600;
}

.chart-x-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--light);
  letter-spacing: 0.04em;
}

/* Legend */
.flavor-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  max-width: 800px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--dark);
}

.legend-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--black);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   STRIP CARDS (띠지)
   ============================================================ */

.strip-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 8px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Strip column headers ──────────────────────────────────── */
/* sticker-row 구조와 동일하게: [28px num gap] [72px roastery] [300px origin] [1fr note] [auto collect] */
.strip-col-headers {
  display: grid;
  grid-template-columns: 38px 72px minmax(0, 300px) minmax(0, 1fr);
  column-gap: 0;
  padding: 0 0 6px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.strip-header-col {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
}

/* 모든 라벨 가운데 정렬 */
.strip-header-col { text-align: center; }

.strip-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 64px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  background: none;
  border: none;
}

.archive-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 32px;
  width: 640px;
  max-width: 100%;
}

/* ── Sticker Row (번호 + 카드 + 수집버튼) ───────────────────── */
.sticker-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.sticker-row--archive {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  width: 100%;
  gap: 0 4px;
}

/* ── Sticker Card ────────────────────────────────────────────── */

:root {
  --sticker-bg: #ffffff;
  --sticker-border: #111;
}

.sticker-band {
  width: 8px;
  align-self: stretch;
}

.sticker-card {
  display: grid;
  grid-template-columns: 8px 72px minmax(0, 300px) minmax(0, 1fr);
  align-items: stretch;
  background: var(--sticker-bg);
  border: 1.5px solid var(--sticker-border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.sticker-card:hover {
  box-shadow: 0 5px 18px rgba(0,0,0,0.14);
}

/* 외부 번호 */
.sticker-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6B3F1E;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sticker-num--archive {
  width: auto;
  min-width: 32px;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--light);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Col 1: 볶은 곳 */
.sticker-col-roastery {
  padding: 12px 8px;
  border-right: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.sticker-roastery-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* 로우키, 나무사이로, 클라리멘토 로고는 원본에 여백이 많아 시각적으로 작게 보임 → 살짝 확대 */
.sticker-roastery-logo[alt="로우키"],
.sticker-roastery-logo[alt="나무사이로"],
.sticker-roastery-logo[alt="클라리멘토"] {
  transform: scale(1.35);
}

.sticker-roastery-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.sticker-roastery-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: #333;
  line-height: 1.3;
  word-break: keep-all;
}

/* Col 2: 원재료 */
.sticker-col-origin {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border-right: none;
  min-width: 0;
}

.sticker-country-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sticker-country {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.3;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticker-selling-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--selling);
  background: #e8f5ee;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 2×2 grid: Region Variety / Process Producer */
.sticker-origin-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 10px;
}

.sticker-origin-cell {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.sticker-origin-label {
  font-size: 9px;
  font-weight: 500;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-sans);
  flex-shrink: 0;
}

.sticker-origin-val {
  font-size: 10px;
  font-weight: 600;
  color: #333;
  font-family: var(--font-sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Col 3: 이런 향이 날지도..? */
.sticker-col-note {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  min-width: 0;
}

.sticker-note-spacer {
  height: 28px;
  flex-shrink: 0;
}

.sticker-note-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 4px;
}

.sticker-note-text {
  font-size: 10px;
  font-weight: 500;
  color: #333;
  line-height: 1.5;
  word-break: keep-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 반응형 ────────────────────────────────────────────────────
   >900px  : 4컬럼 풀
   600-900 : note 컬럼 숨김, origin 확장
   <600px  : 2행 스택
   ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  /* 칼럼명 숨김 */
  .strip-col-headers { display: none; }

  /* 스티커 row: num + card + 버튼 (3col 그리드 유지) */
  .sticker-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 0 10px;
    position: static;
  }
  /* archive row: 번호 컬럼 더 넓게 */
  .sticker-row--archive {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 0 4px;
  }
  /* 900px 이하: V4 칩 디자인을 그대로 사용 (별도 오버라이드 없음) */
  .sticker-row .btn-collect {
    position: static;
    grid-column: unset;
    grid-row: unset;
    margin: 0;
    z-index: 2;
  }
  .sticker-num {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  .sticker-card {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: 8px 72px 1fr;
  }
  /* 노트: 카드 하단에 full-width row로 */
  .sticker-col-note {
    display: flex;
    grid-column: 1 / -1;
    border-top: 1px solid rgba(0,0,0,0.10);
    padding: 7px 14px 7px 14px;
  }
  /* 좁은 레이아웃에서 노트 spacer 불필요 */
  .sticker-note-spacer {
    display: none;
  }
}

/* ── Collect animation ──────────────────────────────────────── */

.sticker-clone {
  pointer-events: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.8, 1), opacity 0.45s ease;
}

@keyframes mypage-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.mypage-bounce img {
  animation: mypage-bounce 0.5s ease;
}

/* ── Sticker wall (log.html) ───────────────────────────────── */

.sticker-wall-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 12px;
}

.sticker-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.sticker-chip {
  background: #fdfcf9;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.07);
  min-width: 120px;
  max-width: 180px;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: transform 0.12s, box-shadow 0.12s;
}

.sticker-chip::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}

.sticker-chip:hover {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 3px 6px 14px rgba(0,0,0,0.12);
}

.sticker-chip-roastery {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 3px;
}

.sticker-chip-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  word-break: keep-all;
}

.sticker-chip-note {
  font-size: 10px;
  color: var(--mid);
  line-height: 1.4;
  word-break: keep-all;
}


/* ── 기록 버튼 (V4 디자인) ────────────────────────────────────
   미수집·수집됨 같은 outline 칩 디자인 — 색만 주황(액션)↔회색(완료)
   카드 정보 위계를 살리고, 액션 자리는 일관된 형태 유지 */
.btn-collect {
  width: auto;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1.5px solid #e8600a;
  background: linear-gradient(135deg, #fff 0%, #fff5ec 100%);
  color: #e8600a;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.btn-collect svg {
  width: 14px;
  height: 14px;
  color: #e8600a;
  display: block;
}

.btn-collect::after {
  content: "기록하기 →";
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.btn-collect:hover {
  background: #e8600a;
  color: #fff;
}

.btn-collect:hover svg { color: #fff; }

.btn-collect.collected {
  border-color: #b8b0a4;
  background: linear-gradient(135deg, #fff 0%, #f5f3ef 100%);
  color: #888;
}

.btn-collect.collected svg { color: #888; }

.btn-collect.collected::after { content: "기록완료 ✓"; }

.btn-collect.collected:hover {
  background: #888;
  color: #fff;
  border-color: #888;
}

.btn-collect.collected:hover svg { color: #fff; }

/* ─── Menu section ─────────────────────────────── */
.menu-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px var(--gutter) 80px;
}

.menu-category {
  margin-bottom: 36px;
}

.menu-intro-section {
  padding: 36px 28px 36px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 공책 레이아웃 */
.notebook-wrap {
  padding: 28px 30px 40px;
  display: flex;
  justify-content: center;
  position: relative;
}

.notebook-spread {
  display: flex;
  align-items: stretch;
  border-radius: 6px;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.13),
    0 8px 28px rgba(0,0,0,0.10);
  overflow: hidden;
  background: #f7f3ec;
  width: 100%;
  max-width: 1080px;
  height: 640px;
}

/* 왼쪽 페이지 */
.notebook-page-left {
  flex: 1;
  position: relative;
  overflow: hidden;
  box-shadow: inset -4px 0 10px rgba(0,0,0,0.08);
}

.notebook-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 바인딩 */
.notebook-spine {
  width: 10px;
  flex-shrink: 0;
  background: linear-gradient(
    to right,
    #c8bfb0 0%,
    #e8e0d4 40%,
    #d0c8bc 60%,
    #b8b0a4 100%
  );
  box-shadow:
    inset -1px 0 2px rgba(0,0,0,0.08),
    inset 1px 0 2px rgba(255,255,255,0.3);
}

/* 오른쪽 페이지 */
.notebook-page-right {
  flex: 1;
  box-shadow: inset 4px 0 10px rgba(0,0,0,0.06);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.notebook-single {
  max-width: 1080px;
  width: 100%;
}

.notebook-page-full {
  flex: 1;
  box-shadow: none;
}

.notebook-turn-btn-left {
  margin-left: 0;
  margin-right: 10px;
}

.notebook-turn-btn {
  align-self: center;
  flex-shrink: 0;
  margin-left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  font-size: 20px;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, box-shadow 0.15s;
}

.notebook-turn-btn:hover {
  background: #f5f5f5;
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}

/* ── RBC Cover Page ──────────────────────────────────────── */
.rbc-cover-wrap {
  padding: 28px 30px 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

.rbc-cover-paper {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 3 / 4;
  background-color: #f0e2c8;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13), 0 8px 28px rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  z-index: 1;
}

/* 가죽 커버 질감 오버레이 */
.rbc-paper-texture {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background:
    /* 좌측 스파인 그림자 */
    linear-gradient(to right, rgba(0,0,0,0.10) 0%, transparent 8%),
    /* 우측 엣지 그림자 */
    linear-gradient(to left,  rgba(0,0,0,0.07) 0%, transparent 6%),
    /* 상단 하이라이트 */
    linear-gradient(to bottom, rgba(255,255,255,0.18) 0%, transparent 20%),
    /* 전체 미묘한 중앙 밝기 */
    radial-gradient(ellipse at 40% 35%, rgba(255,255,255,0.14) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* 가로 밴드 제거 */

/* 책갈피 끈 컨테이너 */
.rbc-cover-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  flex-shrink: 0;
}

.rbc-cover-container .rbc-cover-paper {
  max-width: none;
}

/* 책갈피 끈 — 공책 커버 뒤에서 나오는 구조 */
.rbc-cover-bookmark {
  position: absolute;
  bottom: -26px;   /* 끝이 커버 아래로 26px 나옴 */
  left: 8%;
  width: 11px;
  height: 38px;    /* 전체 길이, 상단 12px는 커버 뒤로 숨음 */
  background: linear-gradient(to right, #b84e0c, #e0620a, #b84e0c);
  border-radius: 0 0 1px 1px;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

/* 갈라진 실 — 왼쪽 */
.rbc-cover-bookmark::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0px;
  width: 2px;
  height: 12px;
  background: #b84e0c;
  transform-origin: top left;
  transform: rotate(-24deg);
  border-radius: 0 0 2px 2px;
}

/* 갈라진 실 — 오른쪽 */
.rbc-cover-bookmark::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0px;
  width: 2px;
  height: 9px;
  background: #c85a10;
  transform-origin: top right;
  transform: rotate(20deg);
  border-radius: 0 0 2px 2px;
}

/* 끈 버클 — 제거 */
.rbc-cover-strap-tab {
  display: none;
}

/* 스파인 구멍 */
.rbc-cover-spine-dots {
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 30px 0;
  z-index: 2;
  pointer-events: none;
}

.rbc-cover-spine-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}


/* 하단 팀원 사진 3장 묶음 */
.rbc-cover-photos-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  padding: 0 12px;
  z-index: 3;
}

.rbc-cover-photo {
  position: relative;
  width: 16%;
  aspect-ratio: 3 / 4;
  overflow: visible;
  border-radius: 2px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  flex-shrink: 0;
}

.rbc-cover-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 2px;
  overflow: hidden;
}

/* 클립 */
.photo-clip {
  position: absolute;
  bottom: -11px;
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 22px;
  border: 2.5px solid #b0b0b0;
  border-radius: 5px;
  background: transparent;
  z-index: 4;
}

/* 가운데 사진 (누끼) — 외곽선/그림자 제거 */
.photo-b2 {
  box-shadow: none;
  border-radius: 0;
}
.photo-b2 img {
  object-fit: contain;
  object-position: center;
  border-radius: 0;
}

.photo-b1 { transform: rotate(-6deg); transform-origin: bottom center; margin-bottom: 8px; }
.photo-b2 { transform: rotate(1deg);  transform-origin: bottom center; margin-bottom: 0;  z-index: 4; }
.photo-b3 { transform: rotate(7deg);  transform-origin: bottom center; margin-bottom: 6px; }

/* Masking tape labels */
.rbc-cover-labels {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 22%;
}

.rbc-cover-label {
  display: block;
  padding: 6px 18px;
  font-family: 'Poor Story', cursive;
  font-size: 17px;
  letter-spacing: 0.04em;
  line-height: 1.3;
  white-space: nowrap;
  /* 마스킹 테이프: 반투명 크림색, 양 끝 찢긴 느낌 */
  background: rgba(245, 238, 210, 0.82);
  color: #2a1a0a;
  border: none;
  box-shadow: 1px 2px 6px rgba(0,0,0,0.12);
  /* 찢긴 느낌: clip-path 불규칙 */
  clip-path: polygon(
    0% 8%, 2% 0%, 5% 4%, 8% 1%,
    92% 3%, 95% 0%, 98% 5%, 100% 2%,
    100% 90%, 97% 100%, 94% 95%, 91% 100%,
    9% 97%, 6% 100%, 3% 94%, 0% 100%
  );
}

.rbc-cover-label:first-child {
  transform: rotate(-1.2deg);
}

.rbc-cover-label:last-child {
  transform: rotate(0.8deg);
}

.rbc-cover-label.label-inverted {
  background: rgba(245, 238, 210, 0.82);
  color: #7a3e1a;
  transform: rotate(-1.2deg);
}

.notebook-lines {
  padding: 36px 20px 36px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: #faf7f2;
  min-height: 100%;
  justify-content: center;
}

.menu-intro-text {
  font-size: 18px;
  line-height: 1.8;
  color: #333;
  white-space: pre-line;
  font-family: 'Poor Story', cursive;
}

/* RBC 소개 — 640 공책 안에 스크롤 없이 담기, 단락 구분 명확히 */
.rbc-intro-lines {
  justify-content: flex-start;
  padding-top: 40px;
  padding-bottom: 30px;
  padding-left: 52px;
  gap: 14px;
}

.rbc-intro-text {
  font-size: 15px;
  line-height: 1.45;
  color: #333;
  white-space: pre-line;
  font-family: 'Poor Story', cursive;
}

.rbc-intro-text b {
  color: #7a3e1a;
}

/* 공책 모바일 대응 */
@media (max-width: 540px) {
  .notebook-spread {
    flex-direction: column;
    height: auto;
  }
  .notebook-page-left {
    aspect-ratio: 4 / 3;
    flex: none;
    width: 100%;
  }
  .notebook-spine {
    width: 100%;
    height: 10px;
    background: linear-gradient(
      to bottom,
      #c8bfb0 0%,
      #e8e0d4 40%,
      #d0c8bc 60%,
      #b8b0a4 100%
    );
  }
  .notebook-lines {
    padding: 24px 20px 28px 24px;
  }
  .notebook-turn-btn {
    display: none;
  }
  /* 커버 페이지 우측 버튼 */
  .rbc-cover-wrap .notebook-turn-btn {
    display: flex;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    z-index: 10;
  }
  /* 소개글·메뉴 좌우 버튼 — 노트 좌우 중앙 플로팅 */
  .notebook-wrap {
    position: relative;
  }
  .notebook-wrap .notebook-turn-btn-left,
  .notebook-wrap .notebook-turn-btn-right {
    display: flex;
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    margin: 0;
    z-index: 10;
  }
  .notebook-wrap .notebook-turn-btn-left {
    left: 4px;
  }
  .notebook-wrap .notebook-turn-btn-right {
    right: 4px;
  }
}

/* 오른쪽 넘기기 버튼 (기본) */
.notebook-turn-btn-right {
  align-self: center;
  flex-shrink: 0;
  margin-left: 10px;
}

/* 메뉴 소개 페이지 — RBC 소개 페이지와 필 버튼/노트 간격 통일 */
.menu-guide-page .notebook-wrap { padding: 28px 20px 40px; }
.menu-guide-page .notebook-spread { min-height: 0; }

/* 메뉴 소개 좌우 패널 */
.menu-guide-left {
  background: #faf7f2;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  padding-top: 0;
}

.menu-guide-list {
  width: 100%;
  padding: 44px 12px 16px 40px;
  box-sizing: border-box;
}

.menu-guide-section {
  width: 100%;
}

.menu-guide-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #7a6350;
  letter-spacing: 0.12em;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  margin: 0 0 10px 4px;
  padding-bottom: 0;
}

.menu-guide-divider-h {
  width: 100%;
  height: 1px;
  background: #e8e2d8;
  margin: 22px 0 18px;
}

.menu-guide-col {
  display: flex;
  gap: 0;
  width: 100%;
}

.menu-guide-col-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 12px;
}

.menu-guide-col-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 12px;
}

/* 스티커 노트 카드 */
.menu-guide-category {
  position: relative;
  padding: 10px 12px 6px;
  border-radius: 2px 2px 3px 3px;
  box-shadow: 2px 4px 10px rgba(0,0,0,0.16), 0 1px 3px rgba(0,0,0,0.08);
  margin-top: 6px;
}

/* 테이프 공통 */
.menu-guide-category::before {
  content: '';
  position: absolute;
  top: -9px;
  width: 38px;
  height: 17px;
  border-radius: 2px;
  z-index: 2;
  opacity: 0.82;
}

/* 상단(Coffee) 좌측: Espresso */
[data-section="coffee"] .menu-guide-col-left .menu-guide-category:nth-child(1) {
  background: #f2ece0;
  transform: rotate(-1.3deg);
}
[data-section="coffee"] .menu-guide-col-left .menu-guide-category:nth-child(1)::before {
  left: 30%;
  background: #c9b89a;
  transform: rotate(-3deg);
}

/* 상단(Coffee) 우측: Filter */
[data-section="coffee"] .menu-guide-col-right .menu-guide-category:nth-child(1) {
  background: #ede6d6;
  transform: rotate(0.7deg);
}
[data-section="coffee"] .menu-guide-col-right .menu-guide-category:nth-child(1)::before {
  left: 40%;
  background: #b8c9a8;
  transform: rotate(2deg);
}

/* 하단 좌측: Non Coffee */
[data-section="other"] .menu-guide-col-left .menu-guide-category:nth-child(1) {
  background: #f5f0e6;
  transform: rotate(-0.5deg);
}
[data-section="other"] .menu-guide-col-left .menu-guide-category:nth-child(1)::before {
  left: 35%;
  background: #d4b8a8;
  transform: rotate(-1.5deg);
}

/* 하단 좌측: Dessert */
[data-section="other"] .menu-guide-col-left .menu-guide-category:nth-child(2) {
  background: #ece5d5;
  transform: rotate(1.1deg);
}
[data-section="other"] .menu-guide-col-left .menu-guide-category:nth-child(2)::before {
  left: 32%;
  background: #a8bdd4;
  transform: rotate(2.5deg);
}

/* 하단 우측: Goods */
[data-section="other"] .menu-guide-col-right .menu-guide-category:nth-child(1) {
  background: #f0e9db;
  transform: rotate(-0.8deg);
}
[data-section="other"] .menu-guide-col-right .menu-guide-category:nth-child(1)::before {
  left: 38%;
  background: #c9b8a8;
  transform: rotate(-2deg);
}

.menu-guide-category-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(80,60,40,0.5);
  letter-spacing: 0.06em;
  font-family: 'Space Mono', monospace;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.menu-guide-category-title::before { content: '{'; margin-right: 4px; }
.menu-guide-category-title::after  { content: '}'; margin-left: 4px; }

.menu-guide-item {
  list-style: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 6px 4px 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  min-width: 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  border-radius: 4px;
}
.menu-guide-item:last-child { border-bottom: none; }

.menu-guide-item-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.menu-guide-item-ko {
  font-size: 14px;
  font-weight: 600;
  color: #7a6350;
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-guide-item-en {
  font-size: 10px;
  font-weight: 400;
  color: #b09a84;
  letter-spacing: 0.04em;
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 화살표 */
.menu-guide-item::after {
  content: '›';
  font-size: 16px;
  color: rgba(120,90,65,0.3);
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
}

.menu-guide-item:hover {
  background: rgba(0,0,0,0.04);
  transform: translateX(2px);
}
.menu-guide-item:hover .menu-guide-item-ko { color: #2a1a0e; }
.menu-guide-item:hover .menu-guide-item-en { color: #7a5a40; }
.menu-guide-item:hover::after {
  color: rgba(120,90,65,0.7);
  transform: translateX(2px);
}

/* 선택된 항목 */
.menu-guide-item.active {
  background: rgba(0,0,0,0.06);
}
.menu-guide-item.active .menu-guide-item-ko { color: #2a1a0e; font-weight: 700; }
.menu-guide-item.active .menu-guide-item-en { color: #7a5a40; }
.menu-guide-item.active::after {
  content: '›';
  color: #8a6040;
  transform: translateX(3px);
}

.menu-guide-item.active {
  position: relative;
  background: rgba(0,0,0,0.05);
  border-left: 2.5px solid #8a6040;
  padding-left: 6px;
}

.menu-guide-item.active .menu-guide-item-ko {
  color: #2a1a0e;
  font-weight: 700;
}

.menu-guide-item.active .menu-guide-item-en {
  color: #7a5a40;
}

.menu-guide-item.active::after {
  color: #8a6040;
}

/* 메뉴 소개: 좁은 화면에서 항목 텍스트가 잘리지 않도록 */
@media (max-width: 540px) {
  .menu-guide-list {
    padding: 24px 12px 24px 14px;
  }
  .menu-guide-col-left {
    padding-right: 8px;
  }
  .menu-guide-col-right {
    padding-left: 8px;
  }
  .menu-guide-category {
    padding: 16px 8px 12px;
  }
  .menu-guide-item {
    padding: 6px 4px 6px 6px;
    gap: 2px;
  }
  .menu-guide-item-ko {
    font-size: 12.5px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.3;
    word-break: keep-all;
  }
  .menu-guide-item-en {
    font-size: 9px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
  }
  .menu-guide-item::after {
    font-size: 14px;
  }
}

.menu-guide-desc-panel {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow-y: auto;
}

.menu-guide-desc {
  display: none;
  width: 100%;
  height: 100%;
}

.menu-guide-desc.active {
  display: block;
  overflow-y: auto;
  height: 100%;
}

/* 패널 내 coffee-modal-layout: 좌우 분리, 좌측 이미지 */
.menu-guide-desc .coffee-modal-layout {
  flex-direction: row;
  height: 100%;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  padding: 0;
  gap: 0;
  align-items: stretch;
}

.menu-guide-desc .coffee-modal-left {
  flex: 0 0 35% !important;
  width: 35% !important;
  min-width: unset !important;
  max-width: unset !important;
  border-right: 1.5px solid #111;
  border-bottom: none;
  background: #f5f2ed;
  border-radius: 0;
  padding: 20px 16px 20px 16px;
  gap: 12px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
}

.menu-guide-desc .coffee-modal-image,
.menu-guide-desc .coffee-modal-image-placeholder {
  width: 100% !important;
  height: auto !important;
  min-height: unset !important;
  aspect-ratio: 3 / 4 !important;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
}

.menu-guide-desc .coffee-modal-image-initial {
  font-size: 36px;
}

.menu-guide-desc .coffee-modal-image-roastery {
  font-size: 10px;
  text-align: center;
}

.menu-guide-desc .coffee-modal-right {
  flex: 1;
  min-width: 0;
  padding: 20px 22px 24px;
  background: #faf8f5;
  border-radius: 0;
  overflow-y: auto;
  max-height: none;
  gap: 0;
}

.menu-guide-desc .coffee-modal-name {
  font-size: 20px;
}

.menu-guide-desc .coffee-modal-section {
  border-top-width: 1px;
  padding-top: 12px;
  margin-top: 12px;
}

.menu-guide-desc .coffee-modal-section-title {
  font-size: 10px;
  margin-bottom: 8px;
}

.menu-guide-desc .coffee-modal-team-bubble {
  font-size: 14px;
  padding: 10px 13px;
  line-height: 1.65;
}

.menu-guide-desc .coffee-modal-team-name {
  font-size: 12px;
}

.menu-guide-desc .coffee-modal-team-date {
  font-size: 13px;
}

.menu-guide-desc .coffee-modal-review-memo {
  font-size: 15px;
}

.menu-guide-desc .coffee-modal-review-date {
  font-size: 13px;
}

.menu-guide-desc .coffee-modal-team-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.menu-guide-desc .coffee-modal-team-face {
  width: 36px;
}

.menu-guide-desc .menu-guide-desc-text {
  font-size: 12px;
  line-height: 1.7;
}

.menu-guide-desc .coffee-modal-header-info {
  margin-bottom: 12px;
  padding-right: 0;
}

.menu-guide-default {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 48px 40px;
  width: 100%;
}

.menu-guide-desc-photo {
  width: calc(100% - 80px);
  margin: 0 40px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  flex-shrink: 0;
}

.menu-guide-desc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-guide-desc-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 40px 32px;
  overflow-y: auto;
}

/* 커피 디테일 포맷 (사진 좌상단 + 우측 설명) */
.menu-guide-desc:has(.menu-guide-detail-layout) {
  padding: 0;
}

.menu-guide-detail-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 0;
}

.menu-guide-detail-img {
  width: 100%;
  flex-shrink: 0;
}

.menu-guide-detail-img img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
  display: block;
  border-bottom: 1.5px solid #111;
}

.menu-guide-detail-content {
  flex: 1;
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.menu-guide-detail-content .menu-guide-desc-name {
  font-size: 20px;
}

.menu-guide-detail-content .menu-guide-desc-text {
  font-size: 14px;
  line-height: 1.8;
}

.menu-guide-team {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.menu-guide-default-title {
  font-size: 18px;
  font-weight: 500;
  color: #ccc;
}

.menu-guide-default-sub {
  font-size: 13px;
  color: #ddd;
}

.menu-guide-desc-name {
  font-size: 26px;
  font-weight: 700;
  color: #2a1a0e;
}

.menu-guide-desc-text {
  font-size: 17px;
  line-height: 1.9;
  color: #555;
  white-space: pre-line;
}

.menu-category-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.menu-item {
  border-bottom: 1px solid var(--border);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 0;
  background: none;
  border: none;
  cursor: pointer;
  gap: 12px;
  text-align: left;
}

.menu-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.menu-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.menu-item-subdesc {
  font-size: 11px;
  font-weight: 400;
  color: var(--light);
}

.menu-item-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.menu-item-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.menu-toggle-icon {
  font-size: 18px;
  font-weight: 300;
  color: var(--light);
  line-height: 1;
  width: 16px;
  text-align: center;
  transition: transform 0.2s ease;
}

/* 상세 설명 드로어 */
.menu-item-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.menu-item-detail p {
  font-size: 13px;
  font-weight: 400;
  color: var(--light);
  line-height: 1.7;
  padding: 0 0 16px;
  margin: 0;
}

/* Archive section */
.archive-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px var(--gutter) 80px;
}

.archive-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   STRIP CARDS — RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
  /* 모바일: 카드 풀폭 유지 + 기록 버튼은 카드 "아래 우측"으로 별도 줄 배치
     (카드 정보 가독성 우선 + 버튼이 위 카드 가리키는 ↑ 시그널) */
  .sticker-row:not(.sticker-row--archive) {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto auto;
    padding-right: 0;
    gap: 6px 4px;
    position: static;
  }
  .sticker-row--archive {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 0 4px;
  }

  .sticker-card {
    grid-template-columns: 8px 60px 1fr;
    border-radius: 12px;
    grid-column: 2;
    grid-row: 1;
  }

  .sticker-country { font-size: 14px; }

  /* 기록 버튼: 카드 아래 row, 우측 정렬, V4 칩 디자인 그대로 */
  .sticker-row:not(.sticker-row--archive) > .btn-collect {
    position: static;
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: center;
    margin: 0;
    bottom: auto;
    right: auto;
  }
  /* 모바일에선 버튼이 카드 아래에 있으니 → 대신 ↑ 로 (위 카드 가리킴) */
  .sticker-row:not(.sticker-row--archive) > .btn-collect:not(.collected)::after {
    content: "기록하기 ↑";
  }

  /* 커피맵: y축 라벨 너비만큼 우측에도 여유를 둬 좌우 균형 */
  .flavor-chart-wrap .flavor-chart-outer {
    padding-right: 48px;
  }

  .flavor-chart, .chart-y-label { height: 240px; }
  .flavor-chart-outer { max-width: 640px; }
  .chart-x-wrap { max-width: 480px; }
}

/* ============================================================
   COFFEE DETAIL PAGE
   ============================================================ */

.coffee-detail-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 16px 60px;
}

.coffee-detail-back {
  margin-bottom: 16px;
}

.coffee-detail-back-btn {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--light);
  cursor: pointer;
  padding: 4px 0;
  letter-spacing: 0.02em;
}

.coffee-detail-back-btn:hover {
  color: var(--black);
}

.coffee-detail-collect {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  width: 100%;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  background: none;
  color: var(--black);
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}

.coffee-detail-collect svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.coffee-detail-collect.collected {
  color: #e8600a;
  opacity: 1;
  border-color: #e8600a;
}

.coffee-detail-collect:hover {
  opacity: 1;
}

/* ============================================================
   ANALYSIS PAGE
   ============================================================ */

.analysis-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px 32px;
  margin-bottom: 16px;
}

.analysis-section {
  padding: 40px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.analysis-section:first-child {
  border-top: none;
  margin-top: 0;
}

.analysis-section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 8px;
}
.analysis-section-subtitle {
  font-size: 13px;
  color: var(--mid);
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  line-height: 1.5;
}
.analysis-section-subtitle .rating-cup-icon--sm {
  width: 14px;
  height: 14px;
  color: var(--dark);
}

/* Section 1: Count */

.analysis-count-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex: 1;
}

.analysis-cup-illustration {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.analysis-count-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
}

.analysis-count-from {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.01em;
  text-transform: none;
  margin-top: 10px;
}
.analysis-count-from-num {
  color: var(--accent);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0;
  margin: 0 2px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
  vertical-align: baseline;
  line-height: inherit;
}
.analysis-count-from-num:hover {
  text-decoration-color: var(--accent);
}

.analysis-count-num {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--black);
  line-height: 1;
}

.analysis-count-unit {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--mid);
  margin-left: 4px;
}

.analysis-count-liters {
  font-size: 13px;
  color: var(--light);
  margin-top: 6px;
  letter-spacing: -0.01em;
}

/* ── Count panels (종류 / 국가) ─────────────────────────────── */

.analysis-count-panels {
  display: block;
}

.count-panel {
  min-width: 0;
  display: none;
  flex-direction: column;
}

.count-panel.active {
  display: flex;
}

.count-panel--kinds {
  align-self: flex-start;
}

.analysis-map-illustration {
  width: 100%;
}

.count-tab-bar {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 16px;
  background: #f0ebe5;
  border-radius: 999px;
  padding: 3px;
}

.count-tab-btn {
  padding: 6px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: #888;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.count-tab-btn.active {
  background: var(--bg);
  color: var(--black);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

.count-kinds-layout {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.count-kinds-left {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.count-kinds-right {
  flex: 1;
  min-width: 0;
}

.count-kinds-left .analysis-count-layout {
  flex: 1;
}

.count-kinds-left .analysis-count-info {
  margin-top: auto;
  margin-bottom: 32px;
}

@media (max-width: 640px) {
  .count-kinds-layout {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  .count-kinds-left,
  .count-kinds-right {
    width: 100%;
  }
  .count-kinds-left .analysis-count-layout {
    flex: 0 0 auto;
  }
  .count-kinds-left .analysis-count-info {
    margin-top: 8px;
    margin-bottom: 0;
  }
  .analysis-cup-illustration {
    width: 200px;
    height: 200px;
  }
  .analysis-count-num {
    font-size: 40px;
    letter-spacing: -0.02em;
  }
  .analysis-count-unit {
    font-size: 16px;
  }
  .count-kinds-right {
    border-top: 1px solid #e8dfd4;
    padding-top: 18px;
    margin-top: 4px;
    position: relative;
  }
  .count-kinds-right::before {
    content: '산미와 농도';
    display: block;
    font-size: 11px;
    color: var(--mid);
    letter-spacing: 0.12em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
  }
}

/* 데스크톱: 졸라맨 지면을 맵 x축 높이와 맞추고, n종류는 지면 아래로 */
@media (min-width: 641px) {
  .count-kinds-left .analysis-count-layout {
    flex-direction: column;
    justify-content: flex-start;
  }
  .count-kinds-left .analysis-cup-illustration {
    margin-top: 63px;
  }
  .count-kinds-left .analysis-count-info {
    margin-top: 16px;
    margin-bottom: 0;
  }
}

.analysis-empty {
  padding: 40px 0 32px;
  color: var(--light);
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}
.analysis-empty-cta-wrap {
  margin-top: 20px;
}
.analysis-empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(200, 87, 26, 0.25);
  transition: opacity 0.15s, transform 0.15s;
}
.analysis-empty-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.analysis-empty-cta-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #fff;
}
.pref-group-empty {
  font-size: 13px;
  color: var(--light);
  line-height: 1.7;
  padding: 12px 0;
  margin: 0;
  text-align: center;
}

/* Section 2: Preferences */

/* ── Analysis Map ─────────────────────────────────────────── */
.analysis-map-wrap {
  margin: 24px auto 8px;
  max-width: 640px;
  width: 100%;
}
.analysis-map-wrap .flavor-chart-outer {
  align-items: stretch;
}
.analysis-map-wrap .chart-y-label {
  height: auto;
  /* x축 높이(~22px)만큼 아래 여백 줘서 연해요가 grid 하단에 맞춤 */
  padding-bottom: 22px;
  align-self: stretch;
}
/* 농도 중간 텍스트 — 가로 표기, 볼드 */
.map-y-mid {
  writing-mode: horizontal-tb !important;
  font-size: 10px !important;
  color: #6b4f35 !important;
  font-weight: 700 !important;
  text-align: right;
}
/* 진해요/연해요 — 눈금 굵기 */
.analysis-map-wrap .chart-y-label span:not(.map-y-mid) {
  font-weight: 600;
}
/* grid + x축을 하나의 컬럼으로 묶어 반응형 처리 */
.analysis-map-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.analysis-map-xaxis {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}
.analysis-map-xaxis span {
  font-size: 10px;
  color: #8a6a50;
  font-weight: 600;
}
.analysis-map-xaxis .chart-x-title {
  font-weight: 700;
  color: #6b4f35;
  letter-spacing: 0.04em;
}

.analysis-map-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(3, 1fr);
  aspect-ratio: 7 / 3;
  flex: 1;
  gap: 1px;
  padding: 1px;
  background: #c8bfb7;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.map-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: background 0.3s;
}
.map-cell.has-coffee {
  background: #ece2d3;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.map-cell.has-coffee:hover {
  background: #e0d3bd;
}
.map-cell.has-coffee:focus-visible {
  outline: 2px solid #7B4F2E;
  outline-offset: -3px;
}
/* 가장 많이 마신 그룹 영역 강조 — 아래 2줄 캡션과 매칭 */
.map-group-highlight {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 6px;
  pointer-events: none;
  background: transparent;
  box-sizing: border-box;
  z-index: 2;
}
/* ── 맛 지도 셀 모달 ─────────────────────────────────────────── */
.map-cell-modal {
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
}
.map-cell-modal-header {
  margin: 10px 0 14px;
}
.map-cell-modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
}
/* Column flex shrinks children by default — keep sticker at its natural height */
.map-cell-modal-list > .visited-sticker {
  flex-shrink: 0;
}

/* 미니 맛 지도 (3×7) — 선택칸만 강조 */
#map-cell-modal-map {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.mini-map-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 18px; /* x축 라벨 높이만큼 */
  font-size: 9px;
  color: #8a6a50;
  font-weight: 600;
  text-align: right;
}
.mini-map-y-mid {
  font-weight: 700;
  color: #6b4f35;
}
.mini-map-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.mini-map-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(3, 1fr);
  aspect-ratio: 7 / 3;
  gap: 1px;
  padding: 1px;
  background: #c8bfb7;
  border-radius: 4px;
}
.mini-map-cell {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mini-map-cell.has-coffee {
  background: #ece2d3;
}
.mini-map-cell.active {
  background: #3a2818;
}
.mini-map-cup-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70%;
  max-width: 28px;
  aspect-ratio: 1;
}
.mini-map-cup-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.mini-map-cup-count {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -42%);
  font-size: 9px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.mini-map-cell.active .mini-map-cup-count {
  color: #fff;
}
@media (max-width: 640px) {
  .mini-map-cup-wrap { max-width: 22px; }
  .mini-map-cup-count { font-size: 8px; }
}
.mini-map-xaxis {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  font-size: 9px;
  color: #8a6a50;
  font-weight: 600;
}
.mini-map-xaxis span:nth-child(2) {
  font-weight: 700;
  color: #6b4f35;
  letter-spacing: 0.04em;
}

.flavor-grid-cell {
  gap: 4px;
  flex-wrap: wrap;
}
.flavor-grid-dot {
  cursor: pointer;
  transition: transform 0.15s;
}
.flavor-grid-dot:hover {
  transform: scale(1.15);
}
.map-cell-count {
  font-size: 12px;
  font-weight: 700;
  color: #5a3520;
}

.map-cup-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}
.map-cup-svg {
  width: 100%;
  height: 100%;
}
.map-cup-count {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -42%);
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
@media (max-width: 640px) {
  .map-cup-wrap { width: 24px; height: 24px; }
  .map-cup-count { font-size: 8px; }
}

.analysis-map-wrap .analysis-map-summary {
  margin-bottom: 32px;
}

.analysis-detail-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: 1.5px solid #d4c5b3;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 36px;
  color: #7B4F2E;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, border-color 0.2s;
}
.analysis-detail-toggle:hover {
  background: rgba(123, 79, 46, 0.05);
  border-color: #7B4F2E;
}
.analysis-detail-toggle .detail-main {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.analysis-detail-toggle .detail-hint {
  font-size: 11px;
  color: #a08060;
  letter-spacing: 0.01em;
}
.analysis-detail-toggle .toggle-arrow {
  font-size: 11px;
}
#analysis-detail-panel .analysis-filter-bar {
  position: sticky;
  top: 56px;
  z-index: 20;
  background: var(--bg);
  padding: 20px 24px 12px;
  margin: 36px -24px 0;
  border-top: 1px solid var(--border);
}
body.mypage-layout #analysis-detail-panel .analysis-filter-bar {
  top: 45px;
}

.analysis-filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.analysis-filter-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  letter-spacing: -0.01em;
}

.analysis-filter-btn.active {
  color: var(--bg);
  border-color: var(--accent);
  background: var(--accent);
}

.analysis-filter-btn.active .rating-cup-icon--sm {
  color: var(--bg);
}

.analysis-filter-btn:hover:not(.active) {
  color: var(--dark);
  border-color: var(--dark);
}

.analysis-pref-empty {
  padding: 40px 0;
  color: var(--light);
  font-size: 14px;
}

/* Pref groups */

.pref-group {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
#analysis-pref-content .pref-group:first-child {
  padding-top: 24px;
}

.pref-group:last-child {
  border-bottom: none;
}

.pref-group-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 10px;
}

.pref-top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.pref-top-item {
  text-align: center;
}

.pref-top-count {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--black);
  line-height: 1.2;
}

.pref-top-label {
  font-size: 12px;
  color: var(--mid);
  margin-top: 4px;
  line-height: 1.4;
}

.pref-rest-list {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pref-rest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.pref-rest-item:last-child {
  border-bottom: none;
}

.pref-rest-label {
  color: var(--dark);
}

.pref-rest-count {
  color: var(--light);
  font-size: 13px;
}

.pref-note-cloud {
  display: flex;
  gap: 12px 18px;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px 0;
}

.pref-note-tag {
  color: var(--dark);
  letter-spacing: -0.01em;
  line-height: 1;
}

.pref-no-data {
  font-size: 13px;
  color: var(--light);
}

/* 선호하는 향 — 3개 가로 타일 (손그림 일러스트) */
.note-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px 0 4px;
}

.note-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 4px;
}

.note-tile-art {
  width: 88px;
  height: 88px;
  margin-bottom: 10px;
}

.note-tile-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.note-tile-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  line-height: 1.2;
}

.note-tile-sub {
  font-size: 11px;
  color: var(--light);
  margin-top: 3px;
  letter-spacing: 0.02em;
}

.note-tile-count {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  letter-spacing: -0.01em;
}

.note-tile--fruity .note-tile-label { color: #c0392b; }
.note-tile--floral .note-tile-label { color: #7b6fa0; }
.note-tile--nutty  .note-tile-label { color: #7b4f2e; }

/* 가공방식 — 3:2 비율 일러스트 타일 */
.note-tile-art--process {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
}
.note-tile-art--process img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Taste summary */
#analysis-taste-summary {
  padding: 0;
}

.analysis-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

#analysis-map-section {
  padding-bottom: 0;
}

#analysis-map-section .analysis-map-wrap {
  margin-top: 0;
}

.taste-summary-sentence.analysis-map-summary {
  margin-top: 32px;
}

/* 은나님이 말해주는 2줄 설명 */
.taste-summary-euna {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
}
.euna-character {
  width: 110px;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}
.euna-speech {
  position: relative;
  background: #fff;
  border: 1.5px solid #d4c5b3;
  border-radius: 14px;
  padding: 14px 18px;
  width: fit-content;
  max-width: min(540px, calc(100vw - 160px));
  text-align: left;
}
.euna-speech::before,
.euna-speech::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.euna-speech::before {
  left: -10px;
  transform: translateY(-50%);
  border-right: 10px solid #d4c5b3;
}
.euna-speech::after {
  left: -8px;
  transform: translateY(-50%);
  border-top-width: 7px;
  border-bottom-width: 7px;
  border-right: 9px solid #fff;
}
.euna-speech .taste-summary-headline,
.euna-speech .taste-summary-sub {
  text-align: left;
}
/* 워드클라우드와 은나 말풍선 사이 작은 구분선 */
.taste-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0 0;
}

/* 관찰 2줄 뒤에 이어지는 추천 한 줄 — 백업성 정보라 톤다운 */
.taste-summary-rec {
  margin: 12px 0 0;
  font-size: 11px;
  color: #bfb5a5;
  line-height: 1.6;
  word-break: keep-all;
  text-align: left;
}
.taste-summary-rec .taste-keyword {
  font-size: 12px;
  color: #a88968;
  font-weight: 600;
}
@media (max-width: 640px) {
  .taste-summary-euna { gap: 2px; }
  .euna-character { width: 84px; }
  .euna-speech { padding: 12px 14px; max-width: none; }
  .euna-speech .taste-summary-headline,
  .euna-speech .taste-summary-sub { font-size: 13px; }
  .euna-speech .taste-summary-rec { font-size: 11px; }
  .euna-speech .taste-summary-headline .taste-keyword,
  .euna-speech .taste-summary-sub .taste-keyword { font-size: 15px; }
  .euna-speech .taste-summary-rec .taste-keyword { font-size: 12px; }
}

.taste-result-wrap {
  max-width: 640px;
  margin: 0 auto;
}
.taste-word-cloud {
  position: relative;
  height: 200px;
  margin: 0 0 20px;
}

.taste-word {
  position: absolute;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  transform: translateX(-50%);
  cursor: default;
}

.taste-summary-sentence {
  margin: 0;
  text-align: center;
}
.taste-summary-headline,
.taste-summary-sub {
  margin: 0;
  font-size: 14px;
  color: var(--light);
  line-height: 1.5;
  word-break: keep-all;
}
.taste-summary-sub {
  margin-top: 4px;
}

.taste-keyword {
  font-size: 16px;
  color: var(--accent);
  font-weight: 700;
}

/* Country carousel */
.country-carousel {
  display: flex;
  align-items: center;
  gap: 4px;
}

.country-list {
  flex: 1;
}

.country-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.country-row:last-child { border-bottom: none; }

.country-flag-circle {
  width: 54px;
  height: 36px;
  border-radius: 4px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}

.country-flag-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.country-info { flex: 1; }

.country-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.country-continent {
  font-size: 12px;
  color: var(--light);
  margin-top: 3px;
}

.country-stats { text-align: right; }

.country-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.pref-count-btn {
  background: none;
  border: none;
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 6px;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  transition: background 0.12s, color 0.12s;
}
.pref-count-btn::after {
  content: '›';
  font-size: 0.85em;
  color: var(--light);
  font-weight: 600;
  line-height: 1;
  transform: translateY(-1px);
  transition: color 0.12s, transform 0.12s;
}
.pref-count-btn:hover {
  background: rgba(123, 79, 46, 0.08);
  color: var(--coffee, #7b4f2e);
}
.pref-count-btn:hover::after {
  color: var(--coffee, #7b4f2e);
  transform: translate(1px, -1px);
}
.pref-count-empty {
  color: var(--light);
  font: inherit;
  letter-spacing: inherit;
}
.note-tile--empty .note-tile-label,
.note-tile--empty .note-tile-sub {
  opacity: 0.5;
}

/* ── 취향 상세 모달 (국가칩 클릭 시 뜨는 country-modal 헤더 스타일 차용) ── */
.pref-detail-modal {
  background: #faf6ee;
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
}
.pref-detail-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
}
.pref-detail-icon {
  flex-shrink: 0;
  width: 54px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  line-height: 1;
}
.pref-detail-icon img,
.pref-detail-icon svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
/* 가공방식 일러스트는 3:2 비율 + 여백이 많아 작아 보임 → 확대 */
.pref-detail-icon--process {
  width: 96px;
  height: 72px;
}
.pref-detail-icon--process img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* 향 일러스트는 정사각형 — 국기보다 살짝 큼직하게 */
.pref-detail-icon--note {
  width: 64px;
  height: 64px;
}
.pref-detail-icon--note svg {
  width: 100%;
  height: 100%;
}
.pref-detail-icon .pref-detail-icon-initial {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #efe6d6;
  color: #7b4f2e;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pref-detail-titles {
  flex: 1;
  min-width: 0;
}
.pref-detail-name {
  font-size: 22px;
  font-weight: 700;
  color: #1e140a;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.pref-detail-en {
  font-size: 10px;
  font-weight: 600;
  color: #a08060;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 3px;
}
.pref-detail-hero {
  margin: 4px 0 14px;
  padding: 0 2px 14px;
}
.pref-detail-hero .hero-big {
  font-size: 22px;
  font-weight: 700;
  color: #1e140a;
  letter-spacing: -0.025em;
  line-height: 1.1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.pref-detail-hero .hero-num {
  color: var(--accent);
}
.pref-detail-hero .hero-unit {
  font-weight: 700;
}
.pref-detail-hero .hero-cup {
  display: inline-flex;
  align-items: flex-end;
  margin-left: 4px;
  align-self: flex-end;
}
.pref-detail-hero .hero-cup-svg {
  width: 28px;
  height: 28px;
  display: block;
}
.pref-detail-modal .map-cell-modal-list {
  border-top: 1px solid #e4dccf;
  padding-top: 14px;
  margin-top: 4px;
}

.country-pct {
  font-size: 12px;
  color: var(--light);
  margin-top: 3px;
}

.country-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 20px;
  color: var(--mid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
  line-height: 1;
  padding: 0;
}

.country-nav-btn:hover {
  border-color: var(--dark);
  color: var(--dark);
}

/* Roastery carousel (좋아하는 로스터리) — country-*와 레이아웃은 유사하지만 로고에 박스 없음 */
.roastery-carousel {
  display: flex;
  align-items: center;
  gap: 4px;
}

.roastery-list { flex: 1; }

.roastery-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.roastery-row:last-child { border-bottom: none; }

.roastery-logo-wrap {
  width: 54px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.roastery-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 원본 이미지 여백 편차를 보정해 시각적 크기 균일화 */
.roastery-logo-img[alt="나무사이로"]   { transform: scale(1.8); }
.roastery-logo-img[alt="로우키"]      { transform: scale(1.6); }
.roastery-logo-img[alt="폰트커피"]     { transform: scale(1.25); }
.roastery-logo-img[alt="히떼"]        { transform: scale(1.2); }
.roastery-logo-img[alt="리브레"]      { transform: scale(1.1); }
.roastery-logo-img[alt="펠트"]        { transform: scale(0.95); }
.roastery-logo-img[alt="모모스"]      { transform: scale(0.9); }

.roastery-logo-abbr {
  font-size: 13px;
  font-weight: 700;
  color: #7B4F2E;
  letter-spacing: -0.02em;
}

.roastery-info { flex: 1; min-width: 0; }

.roastery-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.roastery-stats { text-align: right; }

.roastery-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.roastery-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 20px;
  color: var(--mid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
  line-height: 1;
  padding: 0;
}

.roastery-nav-btn:hover {
  border-color: var(--dark);
  color: var(--dark);
}

/* 구 diary-modal 블록 제거됨 — 새 스타일은 LOG FORM 섹션 아래에 정의 */

.log-card { cursor: pointer; }

/* ── GUEST BOOK ──────────────────────────────────────────────── */
.hay-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: calc(100vh - var(--header-h) - 66px);
}

/* 방명록 (placeholder) */
.hay-guestbook {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - 66px);
  padding: 40px 20px;
  background: #f0ece4;
}
.hay-guestbook-empty {
  text-align: center;
  color: var(--mid);
}
.hay-guestbook-empty-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.hay-guestbook-empty-desc {
  font-size: 13px;
  color: var(--mid);
  letter-spacing: 0.02em;
}

/* LEFT: LCD */
.hay-lcd-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 60px 40px;
}

.lcd-weather {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.lcd-weather svg {
  width: 160px;
  height: 105px;
  display: block;
}
.lcd-weather-temp {
  font-family: 'Comico', var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.02em;
  fill: #4a2e18;
}
.lcd-weather-region {
  font-family: 'Comico', var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.32em;
  color: #4a2e18;
  margin-top: 2px;
}
.lcd-weather-curve {
  font-family: 'Comico', var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  fill: #4a2e18;
}
.lcd-weather-label {
  font-family: 'Comico', var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.32em;
  fill: #4a2e18;
}
.lcd-weather-icon {
  fill: none;
  stroke: #4a2e18;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lcd-machine {
  background: linear-gradient(145deg, #d0d0d0, #a8a8a8);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow:
    4px 4px 10px rgba(0,0,0,0.35),
    -2px -2px 6px rgba(255,255,255,0.5),
    inset 0 1px 2px rgba(255,255,255,0.6);
}

.lcd-screen {
  background: #6abf40;
  background: linear-gradient(160deg, #7ecf4a 0%, #5aab28 100%);
  border-radius: 4px;
  padding: 18px 22px;
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,0.4),
    inset 0 0 20px rgba(0,80,0,0.2);
  width: 320px;
}

.lcd-text {
  font-family: 'Array', monospace;
  font-size: 28px;
  color: #1a3a08;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-shadow: 0 0 4px rgba(0,60,0,0.4);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* RIGHT: Messages */
.hay-messages-wrap {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
}

.hay-messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 32px 32px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - var(--header-h) - 140px);
}

.hay-empty {
  color: var(--light);
  font-size: 14px;
  margin-top: 20px;
}

.hay-msg {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-subtle);
  border-radius: 8px;
}

.hay-msg-avatar-link {
  flex-shrink: 0;
  display: inline-flex;
  text-decoration: none;
  border-radius: 50%;
  transition: opacity 0.15s;
}
.hay-msg-avatar-link:hover { opacity: 0.85; }

.hay-msg-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-subtle);
  background-size: cover;
  background-position: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.hay-msg-avatar--initial {
  background-image: none;
  background-color: #e8e4dd;
}

.hay-msg-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hay-msg-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.01em;
  text-decoration: none;
  width: fit-content;
  transition: color 0.15s;
}
.hay-msg-author:hover {
  color: var(--accent, #6b4f2c);
  text-decoration: underline;
}

.hay-msg-author-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.hay-role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.4;
  flex-shrink: 0;
  white-space: nowrap;
}
.hay-role-admin {
  color: #b45309;
  border: 1px solid #b45309;
}
.hay-role-team {
  color: var(--accent, #6b4f2c);
  border: 1px solid var(--accent, #6b4f2c);
}

.hay-msg-text {
  font-size: 15px;
  color: var(--dark);
  line-height: 1.6;
  word-break: break-word;
}

.hay-msg-time {
  font-size: 12px;
  color: var(--light);
}

.hay-msg-del {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--light);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.hay-msg-del:hover {
  background: rgba(0,0,0,0.08);
  color: var(--dark);
}

.hay-msg-del-inline {
  border: none;
  background: transparent;
  color: var(--light);
  font-size: 14px;
  line-height: 1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.hay-msg-del-inline:hover {
  background: rgba(0,0,0,0.08);
  color: var(--dark);
}

.hay-textarea:disabled {
  background: var(--bg-subtle);
  color: var(--light);
  cursor: not-allowed;
}
.hay-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Compose */
.hay-compose {
  border-top: 1px solid var(--border);
  padding: 16px 32px 24px;
}

.hay-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--dark);
  background: var(--bg);
  resize: none;
  height: 72px;
  outline: none;
  transition: border-color 0.2s;
}

.hay-textarea:focus { border-color: var(--accent); }

.hay-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.hay-char-count {
  font-size: 12px;
  color: var(--light);
}

.hay-submit {
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s;
}

.hay-submit:hover { background: var(--accent); }

/* ── 날짜 구분선 ─────────────────────────────────────── */
.hay-date-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
}
.hay-date-divider::before,
.hay-date-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.hay-date-divider span {
  font-size: 11px;
  color: var(--light);
  letter-spacing: 0.04em;
  white-space: nowrap;
  font-family: var(--font-sans);
}

/* ── 반응 (커스텀 커피잔 SVG) ────────────────────────── */
.hay-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  width: 100%;
}
.hay-reaction-pill,
.hay-reaction-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--dark);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hay-reaction-pill {
  gap: 4px;
  padding: 0 8px 0 6px;
  font-size: 12px;
}
.hay-reaction-pill:hover:not(:disabled),
.hay-reaction-add:hover {
  background: rgba(0, 0, 0, 0.08);
}
.hay-reaction-pill--mine {
  background: rgba(181, 134, 90, 0.16);
  border-color: rgba(181, 134, 90, 0.5);
}
.hay-reaction-pill--mine:hover:not(:disabled) {
  background: rgba(181, 134, 90, 0.24);
}
.hay-reaction-pill:disabled {
  opacity: 0.65;
  cursor: default;
}
.hay-reaction-add {
  width: 28px;
  border: 1px solid var(--border);
  color: var(--light);
}
.hay-reaction-add:hover {
  border-color: var(--mid);
  color: var(--dark);
  background: rgba(0, 0, 0, 0.06);
}
.hay-reaction-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}
.hay-reaction-icon .hay-reaction-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.hay-reaction-count {
  font-weight: 600;
  font-size: 11px;
  min-width: 8px;
  text-align: center;
  line-height: 1;
}

/* ── 이모지 피커 팝업 ──────────────────────────────── */
.hay-reaction-picker {
  position: absolute;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}
.hay-reaction-picker.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.hay-reaction-picker-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 220px;
}
.hay-picker-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.hay-picker-item:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--border);
  transform: scale(1.08);
}
.hay-picker-item .hay-reaction-icon {
  width: 22px;
  height: 22px;
}

@media (max-width: 768px) {
  .hay-layout {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    min-height: unset;
    /* --hay-vh: visualViewport로 실측한 가시 영역(iOS Safari URL바 확장/축소·키보드 대응). 미지원 시 svh 폴백. */
    height: calc(var(--hay-vh, 100svh) - var(--header-h) - 66px);
  }
  .hay-messages-wrap {
    flex: 1;
    min-height: 0;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .hay-messages-list {
    flex: 1;
    min-height: 0;
    max-height: unset;
    padding: 8px 16px 4px;
  }
  .hay-lcd-wrap {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 10px 16px 8px;
    flex-shrink: 0;
    overflow: hidden;
    transition: max-height 0.22s ease, padding 0.22s ease, opacity 0.18s ease;
    max-height: 140px;
  }
  /* 메시지 목록이 바닥이 아닐 때(= 사용자가 과거를 읽는 중) LCD 영역 접기 */
  .hay-lcd-collapsed .hay-lcd-wrap {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
  }
  .lcd-machine {
    flex: 0 0 168px;
    padding: 5px 6px;
  }
  .lcd-screen {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    padding: 6px 8px;
  }
  .lcd-text {
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
  }
  .lcd-weather {
    flex: 0 0 100px;
    gap: 1px;
    align-items: center;
    justify-content: center;
  }
  .lcd-weather svg {
    width: 100px;
    height: auto;
    aspect-ratio: 160 / 105;
  }
  .lcd-weather-region {
    font-size: 9px;
    margin-top: 0;
  }
  .hay-textarea {
    flex: 1;
    min-height: 40px;
    height: 40px;
    max-height: 120px;
    padding: 9px 14px;
    border-radius: 20px;
    /* iOS Safari: font-size < 16px이면 focus 시 페이지 자동 확대됨 → 16px 고정으로 차단 */
    font-size: 16px;
    transition: height 0.15s ease;
  }
  /* Compose: 화면 하단 고정 + 키보드 따라 올라오기 (YouTube/Slack 패턴) */
  .hay-compose {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: var(--bg, #ffffff);
    border-top: 1px solid var(--border);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));

    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;

    /* visualViewport 기반 키보드 가림 높이만큼 위로 이동 */
    transform: translateY(calc(-1 * var(--hay-kb, 0px)));
    transition: transform 0.18s ease-out;
    will-change: transform;
  }
  .hay-compose-footer {
    margin-top: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 2px;
  }
  .hay-char-count {
    font-size: 10px;
    line-height: 1;
  }
  .hay-submit {
    height: 40px;
    border-radius: 20px;
    padding: 0 16px;
  }
}
.log-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.10); }

/* ═══════════════════════════════════════════════════════════════
   국가 칩 + 클릭 상세 모달
═══════════════════════════════════════════════════════════════ */

/* ── 국가 칩 리스트 ── */
.countries-count-row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 6px;
}

.count-unit-expand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.country-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: #f0ece4;
  border: 1px solid #c8bfb0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  color: var(--black);
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
  box-shadow: 0 1px 2px rgba(60, 40, 20, 0.06);
}
.country-expand-btn:hover {
  background: #e6ddd0;
  border-color: #b5865a;
  color: #2a1e10;
  box-shadow: 0 2px 4px rgba(60, 40, 20, 0.1);
}
.country-expand-hint {
  font-size: 12px;
  font-weight: 500;
  color: #5c3e28;
  letter-spacing: -0.01em;
}
.country-expand-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--mid);
  transition: transform 0.18s ease;
}
.country-expand-btn.is-open .country-expand-arrow {
  transform: rotate(180deg);
}
.country-expand-btn:hover .country-expand-arrow {
  color: var(--black);
}

.country-chips-row {
  display: flex;
  padding-top: 16px;
  padding-bottom: 4px;
}

.country-chips-spacer {
  flex: 1;
  flex-shrink: 0;
}

.country-chips-inner {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 20px;
}

.continent-chip-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.continent-chip-label {
  font-size: 11px;
  color: var(--mid);
  white-space: nowrap;
  padding-top: 5px;
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}

.continent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 6px;
  background: #faf6ee;
  border: 1px solid #c8bfb0;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  color: #3a281a;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s, transform 0.12s;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(60, 40, 20, 0.05);
}

.country-chip:hover {
  background: #fff;
  border-color: #b5865a;
  color: #2a1e10;
  box-shadow: 0 2px 5px rgba(60, 40, 20, 0.12);
  transform: translateY(-1px);
}

.country-chip-flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 0 0 1px rgba(60, 40, 20, 0.08);
}

.country-chip-name {
  letter-spacing: -0.01em;
}

.country-chip-chevron {
  color: #b5865a;
  opacity: 0.7;
  flex-shrink: 0;
  margin-left: 1px;
  transition: opacity 0.12s, transform 0.12s;
}

.country-chip:hover .country-chip-chevron {
  opacity: 1;
  transform: translateX(1px);
}

/* ── 모달 오버레이 ── */
.country-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 6, 0.52);
  z-index: 9100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.country-modal-overlay.visible {
  opacity: 1;
}

@media (min-width: 600px) {
  .country-modal-overlay {
    align-items: center;
  }
}

/* ── 모달 카드 ── */
.country-modal-card {
  background: #faf6ee;
  border-radius: 20px 20px 0 0;
  /* 하단 safe area(홈 인디케이터) 여백 반영 */
  padding: 0 20px max(40px, calc(24px + env(safe-area-inset-bottom, 0px)));
  width: 100%;
  max-width: 520px;
  /* dvh: 브라우저 크롬(URL 바 등)이 보이는 상태 기준 뷰포트 → iOS Safari vh 버그 방지 */
  height: 90dvh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 -4px 40px rgba(40, 22, 8, 0.2);
  transform: translateY(20px);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  /* 스크롤바가 border-radius를 무시하고 우상단 코너를 직선으로 만드는 현상 방지 */
  scrollbar-width: none;
}
.country-modal-card::-webkit-scrollbar { display: none; }

.country-modal-overlay.visible .country-modal-card {
  transform: translateY(0);
}

@media (min-width: 600px) {
  .country-modal-card {
    border-radius: 20px;
    height: 86dvh;
    transform: scale(0.96);
  }
  .country-modal-overlay.visible .country-modal-card {
    transform: scale(1);
  }
}

/* ── 헤더 (sticky) ── */
.country-modal-header {
  position: sticky;
  top: 0;
  background: #faf6ee;
  z-index: 2;
  margin: 0 -20px 16px;
  /* safe-area-inset-top: PWA/standalone 모드에서 status bar 높이만큼 padding 확보 */
  padding: max(24px, env(safe-area-inset-top, 24px)) 20px 0;
}
.country-modal-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
}

/* ── 닫기 버튼 (44×44 터치 타겟, flex 인라인) ── */
.country-modal-close {
  flex-shrink: 0;
  margin-left: 4px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #b09070;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border-radius: 8px;
  transition: color 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.country-modal-close:hover { color: #2a1e10; }

.country-modal-flag {
  font-size: 34px;
  line-height: 1;
  flex-shrink: 0;
  width: 54px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.country-modal-flag-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.country-modal-titles {
  flex: 1;
  min-width: 0;
}

.country-modal-name {
  font-size: 22px;
  font-weight: 700;
  color: #1e140a;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.country-modal-en {
  font-size: 10px;
  font-weight: 600;
  color: #a08060;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* ── 결론부 (헤로) ──
   국가명은 헤더에서만 노출. 히어로는 "커피를 / N잔 마셨어요!" 두 줄로 카운트를 강조. */
.country-modal-hero {
  margin: 4px 0 18px;
}
.country-modal-hero-headline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 2px 14px;
}
.country-modal-hero-headline .hero-big {
  font-size: 22px;
  font-weight: 700;
  color: #1e140a;
  letter-spacing: -0.025em;
  line-height: 1.1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.country-modal-hero-headline .hero-num {
  color: var(--accent);
}
.country-modal-hero-headline .hero-unit {
  font-weight: 700;
}
.country-modal-hero-headline .hero-cup {
  display: inline-flex;
  align-items: flex-end;
  margin-left: 4px;
  align-self: flex-end;
}
.country-modal-hero-headline .hero-cup-svg {
  width: 28px;
  height: 28px;
  display: block;
}

/* ── 세부 설명 (기존 journey 슬롯 재활용) ── */
.country-modal-journey {
  margin: 0;
  padding: 12px 14px;
  background: #f5efe6;
  border: 1px solid #e4dccf;
  border-radius: 10px;
}
.journey-progress-label {
  font-size: 13px;
  color: #5a4a38;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.journey-progress-label strong {
  color: #8c5a32;
  font-weight: 700;
}
/* Pill 형태 진행 바 — 좌측 다크브라운 fill(진행도) + 우측 카운터 (n/N) */
.journey-progress-pill {
  position: relative;
  height: 26px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #e4dccf;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.journey-progress-pill-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: #3a2614; /* 앱 톤에 맞춘 딥 브라운 */
  border-radius: 6px 0 0 6px;
  transition: width 0.6s ease;
  min-width: 0;
}
/* 100%일 때는 우측 모서리도 둥글게 */
.journey-progress-pill-fill[style*="width:100%"],
.journey-progress-pill-fill[style*="width: 100%"] {
  border-radius: 6px;
}
.journey-progress-pill-count {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9a8878;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  pointer-events: none;
}
.journey-top-zone {
  margin-top: 10px;
  font-size: 12px;
  color: #7a6850;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.journey-top-zone-label { color: #9a8670; }
.journey-top-zone-value {
  font-weight: 700;
  color: #3a2e20;
}
/* 클릭 가능한 zone 링크 — button 기본 스타일 리셋 + 미세한 hover 단서 */
button.journey-top-zone-link {
  border: none;
  background: transparent;
  padding: 4px 6px;
  margin: -4px -6px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  transition: background 120ms;
}
button.journey-top-zone-link:hover {
  background: rgba(140,90,50,0.08);
}
button.journey-top-zone-link:active {
  background: rgba(140,90,50,0.15);
}
.journey-top-zone-count {
  color: var(--accent);
  font-weight: 700;
  margin-left: 2px;
}

/* ── 상세 지도 ── */
.country-modal-map {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #f0ece4;
  height: 340px;
  position: relative;
  border: 1px solid #c8bfb0;
}

/* ── 지역 칩 ── */
.country-modal-regions {
  min-height: 0;
}

.country-modal-region-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0 4px;
}

.country-region-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  background: #ede8e0;
  color: #7a5c3a;
  border: 1px solid #d4cbbf;
}

.country-region-chip.matched {
  background: #b5865a;
  color: #fff;
  border-color: #9a6a3a;
}

/* ── 지도 하단 색상 인덱스 (지도의 범례 역할을 겸한 탭) ── */
.country-modal-tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0 12px;
}
.country-modal-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e0d8cc;
  background: #faf6ee;
  color: #7a6850;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.01em;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.country-modal-tab-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(58, 46, 32, 0.15);
}
.country-modal-tab.active .country-modal-tab-dot {
  /* 다크 배경 위에서 dot이 묻히지 않도록 크림색 링 */
  box-shadow: 0 0 0 1.5px #faf6ee;
}
.country-modal-tab:hover:not(.active) {
  color: #3a2e20;
  border-color: #c8bba5;
}
.country-modal-tab.active {
  background: #3a2e20;
  color: #faf6ee;
  border-color: #3a2e20;
}

/* ── 커피 목록 ── */
.country-modal-coffees {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.country-modal-coffee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f5f1ea;
  border-radius: 10px;
  border: 1px solid #e0d8cc;
}

.country-modal-coffee-item.collected {
  background: #fdf9f2;
  border-color: #c8a86a;
}

.country-modal-coffee-main {
  flex: 1;
  min-width: 0;
}

.country-modal-coffee-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e140a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-modal-coffee-meta {
  font-size: 11px;
  color: #a08060;
  margin-top: 2px;
}

.country-modal-coffee-memo {
  font-size: 11px;
  color: #7a6550;
  margin-top: 4px;
  font-style: italic;
  opacity: 0.85;
}

.country-modal-coffee-rating {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.country-modal-coffee-rating .rating-cup-icon--sm {
  width: 28px !important;
  height: 28px !important;
}

.country-modal-empty {
  text-align: center;
  color: #b0a090;
  font-size: 12px;
  padding: 16px;
}

/* ── 다녀온 산지: 존 토글 + 스티커 그룹 ───────────────────────── */
/* 주요 산지 리스트(.eth-index-panel)와 동일 베이스 스타일 + 토글/확장/스티커 확장 */
.visited-zones {
  margin: 12px 0 4px;
  padding: 12px 14px;
  background: #faf7f2;
  border: 1px solid #e0d8cc;
  border-radius: 10px;
  animation: zoneInfoIn 200ms ease-out;
}
.visited-zone-row {
  /* .eth-idx-zone-row 베이스 + 전체 row가 토글 트리거 */
  user-select: none;
}
.visited-zone-parent {
  color: #a89878;
  font-weight: 500;
}
.visited-zone-sep {
  color: #c8b8a0;
  margin: 0 3px;
}
.visited-zone-main {
  color: #3a2e20;
  font-weight: 700;
}
.visited-zone-en {
  margin-left: 6px;
  color: #9a8878;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0;
}
.visited-zone-stickers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 10px 12px 34px;
}
.visited-cup {
  cursor: default;
}
.visited-cup:hover {
  background: transparent !important;
}

/* ── 가로형 스티커 (.visited-sticker) ──────────────────────────── */
.visited-sticker {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: stretch;
}
.visited-sticker .diary-mini-band {
  height: auto;
  width: 5px;
  flex-shrink: 0;
}
.visited-sticker .diary-mini-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  min-width: 0;
  min-height: 56px;
}
.visited-sticker .diary-mini-logo-row {
  margin: 0;
  flex-shrink: 0;
  gap: 6px;
}
.visited-sticker .diary-mini-logo-img,
.visited-sticker .diary-mini-abbr {
  width: 22px;
  height: 22px;
}
.visited-sticker .diary-mini-roastery-name {
  display: none;
}
.visited-sticker-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.visited-sticker .diary-mini-coffee-name {
  margin: 0;
  font-size: 13px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}
.visited-sticker .diary-mini-meta {
  display: flex;
  grid-template-columns: none;
  gap: 10px;
  margin: 0;
  min-width: 0;
}
.visited-sticker .diary-mini-meta-item {
  font-size: 10.5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.visited-sticker .visited-sticker-footer {
  padding: 0;
  margin: 0;
  border-top: none;
  flex-shrink: 0;
  gap: 10px;
}
.visited-sticker .visited-sticker-rating {
  font-size: 11px;
}
.visited-sticker .visited-sticker-rating svg {
  width: 12px;
  height: 12px;
}
.visited-sticker .visited-sticker-date {
  font-size: 11px;
}

/* 스티커 (diary-mini-sticker 베이스 + 클릭/풋터 확장) */
.visited-sticker {
  cursor: pointer;
  transition: transform 140ms, box-shadow 140ms;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.visited-sticker:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.visited-sticker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid #eee;
  font-size: 11px;
}
.visited-sticker-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  color: #7c5230;
  letter-spacing: -0.02em;
}
.visited-sticker-rating svg {
  width: 13px;
  height: 13px;
  color: #b5865a;
}
.visited-sticker-date {
  color: #999;
  font-weight: 500;
  white-space: nowrap;
}

/* 범례 버튼 */
.eth-legend-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px 5px 8px;
  border: 1px solid rgba(160,138,110,0.3);
  border-radius: 20px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 10px;
  font-weight: 500;
  color: #5a4e40;
  cursor: pointer;
  line-height: 1;
  transition: all 150ms ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.eth-legend-btn:hover {
  background: rgba(255,255,255,0.95);
  border-color: rgba(140,90,50,0.4);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.eth-legend-btn.active {
  background: #3a2e20;
  color: #fff;
  border-color: #3a2e20;
}
.eth-legend-btn.active .eth-legend-dot {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.5);
}
.eth-legend-btn.active .eth-legend-chevron {
  color: rgba(255,255,255,0.7);
}
.eth-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.eth-legend-chevron {
  font-size: 13px;
  color: #b0a090;
  margin-left: 1px;
  line-height: 1;
}

/* 존 정보 패널 */
.eth-zone-info-panel {
  margin: 0 4px 8px;
  padding: 12px 14px;
  background: #faf7f2;
  border: 1px solid #e0d8cc;
  border-radius: 10px;
  animation: zoneInfoIn 200ms ease-out;
}
@keyframes zoneInfoIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.eth-zone-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.eth-zone-info-name {
  font-size: 14px;
  font-weight: 700;
  color: #1e140a;
}
.eth-zone-info-close {
  width: 22px; height: 22px;
  border: none; background: none;
  font-size: 16px; color: #b0a090;
  cursor: pointer; line-height: 1;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.eth-zone-info-close:hover { background: #ece6dc; }
.eth-zone-info-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.eth-zone-tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  background: #ece6dc;
  color: #6b5840;
  font-weight: 500;
  white-space: nowrap;
}
.eth-zone-tag.accent {
  background: #8c5a32;
  color: #fff;
}
.eth-zone-tag-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 120ms;
}
.eth-zone-tag-link:hover {
  background: #ddd4c2;
}
.eth-zone-info-desc {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #5a4a38;
}

/* 산지 인덱스 패널 — 다녀온 산지(.visited-zones)와 동일 외곽 */
.eth-index-panel {
  margin: 12px 0 4px;
  padding: 12px 14px;
  background: #faf7f2;
  border: 1px solid #e0d8cc;
  border-radius: 10px;
  animation: zoneInfoIn 200ms ease-out;
}
.eth-index-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.eth-index-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e140a;
}
.eth-index-close {
  width: 22px; height: 22px;
  border: none; background: none;
  font-size: 16px; color: #b0a090;
  cursor: pointer; line-height: 1;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.eth-index-close:hover { background: #ece6dc; }
.eth-index-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.eth-idx-zone-row,
.eth-idx-woreda-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms;
}
.eth-idx-zone-row:hover,
.eth-idx-woreda-row:hover {
  background: #ece6dc;
}
/* 선택된 행: 지도 선택색(녹색)과 매칭 */
.eth-idx-zone-row.eth-idx-selected,
.eth-idx-woreda-row.eth-idx-selected {
  background: rgba(107,138,90,0.18);
}
/* 체크박스 크기는 수집/미수집 모두 동일 */
.eth-idx-dot {
  width: 14px; height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.eth-idx-dot-sm {
  width: 10px; height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.eth-idx-dot-check {
  width: 100%;
  height: 100%;
  display: block;
}
.eth-idx-name {
  /* 한글/영문 split 컴포넌트(.visited-zone-main / .visited-zone-en)를 자식으로 가지므로
     색/굵기/크기는 자식 span에서 결정. 여기서는 베이스 라인만 잡음. */
  font-size: 13.5px;
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
}
/* 주요 산지 탭은 수집/미수집 모두 동일 톤으로 표시.
   수집 여부는 dot 색상(.eth-idx-dot의 inline background)으로만 구분. */
/* 수집 산지 대표 커피 프리뷰 */
.eth-idx-zone-preview {
  padding: 0 10px 6px 54px;
  font-size: 11px;
  color: #a09080;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 미수집 산지 풍미 힌트 */
.eth-idx-flavor-hint {
  margin-left: auto;
  font-size: 10px;
  color: #c0aa8a;
  white-space: nowrap;
  flex-shrink: 0;
}
.eth-idx-cup {
  width: 32px;
  height: 32px;
  margin-left: auto;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 6px;
  padding: 2px;
  transition: background 120ms;
}
.eth-idx-cup:hover {
  background: rgba(140,90,50,0.12);
}
.eth-idx-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #8c5a32;
  color: #fff;
  font-weight: 600;
  margin-left: auto;
}
.eth-idx-woredas {
  padding-left: 40px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.eth-idx-woredas .eth-idx-name {
  font-size: 12px;
  color: #6b5840;
}
.eth-idx-toggle,
.eth-idx-toggle-spacer {
  font-size: 18px;
  color: #7a6a58;
  width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
  line-height: 1;
  margin: -6px -4px -6px -8px;
  border-radius: 8px;
}
.eth-idx-toggle {
  cursor: pointer;
}
.eth-idx-toggle:hover {
  background: rgba(140,90,50,0.12);
}

/* ── 과테말라 농장 행 (eth-idx-woreda-row 위에 덮어씀) ── */
.gtm-farm-list {
  padding-top: 2px;
  padding-bottom: 2px;
}
.gtm-farm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms;
}
.gtm-farm-row:hover { background: #ece6dc; }
.gtm-farm-row.eth-idx-selected { background: rgba(107,138,90,0.18); }
.gtm-farm-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.gtm-farm-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #4a3a28;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.gtm-farm-muni {
  margin-left: auto;
  font-size: 10.5px;
  color: #a09080;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── 인덱스 섹션 헤더 (주요 산지/화산 구분선) ───────── */
.gtm-idx-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a08866;
  padding: 14px 10px 6px;
  margin-top: 4px;
  border-top: 1px solid #e6dfd2;
}
.gtm-idx-section-header:first-child {
  border-top: none;
  margin-top: 0;
}
.gtm-idx-volcano-header {
  cursor: pointer;
  user-select: none;
  transition: color 120ms;
}
.gtm-idx-volcano-header:hover { color: #6b4a28; }
.gtm-idx-volcano-header .eth-idx-toggle {
  font-size: 10px;
  color: inherit;
}
.gtm-idx-section-count {
  font-size: 10px;
  font-weight: 600;
  color: #b5a088;
  letter-spacing: 0;
  margin-left: 2px;
}

/* ── 화산 목록 ──────────────────────────────────── */
.gtm-volcano-list {
  padding: 2px 0 4px;
}
.gtm-volcano-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms;
  text-decoration: none;
  color: inherit;
}
.gtm-volcano-row:hover { background: #ece6dc; }
.gtm-volcano-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.gtm-volcano-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.gtm-volcano-name .visited-zone-main {
  font-size: 12.5px;
  font-weight: 600;
  color: #4a3a28;
}
.gtm-volcano-name .visited-zone-en {
  font-size: 10.5px;
  color: #a09080;
  font-weight: 500;
}
.eth-index-back {
  border: none;
  background: none;
  font-size: 13px;
  color: #8c5a32;
  cursor: pointer;
  padding: 4px 0;
  font-weight: 600;
}
.eth-index-back:hover { text-decoration: underline; }
.eth-idx-detail-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e140a;
}
.eth-idx-coffee-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.eth-idx-coffee-item {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e8e0d4;
  border-radius: 8px;
}
.eth-idx-coffee-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e140a;
}
.eth-idx-coffee-meta {
  font-size: 11px;
  color: #a09080;
  margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────
   Pokedex 스타일 메뉴 카드 (coffee/shop/menu.html 우측 패널)
   ───────────────────────────────────────────────────────── */
.pokedex-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: 'Space Mono', 'Courier New', monospace;
  background: #faf8f5;
  color: #1a1a1a;
  padding: 20px 22px 24px;
  overflow-y: auto;
  box-sizing: border-box;
}

/* 상단 영역: 이미지(좌) + 메타(우) */
.pokedex-top {
  display: grid;
  grid-template-columns: minmax(150px, 48%) 1fr;
  gap: 28px;
  position: relative;
  align-items: stretch;
}

.pokedex-img-wrap {
  display: flex;
  flex-direction: column;
  align-self: start;
  min-width: 0;
}
.pokedex-img-source {
  margin: 8px 2px 0;
  font-size: 11px;
  color: #888;
  text-align: left;
  letter-spacing: 0.2px;
  word-break: break-all;
}
.pokedex-img {
  aspect-ratio: 1 / 1;
  width: 100%;
  align-self: start;
  /* 폴라로이드 스티커 스타일 */
  background: white;
  border: none;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 4px 8px 18px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
}
/* 상단 마스킹 테이프 스티커 */
.pokedex-img::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 56px;
  height: 18px;
  background: rgba(245, 235, 215, 0.85);
  border-radius: 1px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  z-index: 2;
}
.pokedex-img > * {
  width: 100%;
  height: 100%;
}
.pokedex-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pokedex-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #6b6b6b;
}
.pokedex-img-placeholder .pokedex-img-initial {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 1px;
}
.pokedex-img-placeholder .pokedex-img-sub {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 우측 메타 영역 — NAME / CATEGORY / HT / WT 4행 */
.pokedex-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pokedex-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1.1;
  margin: 0 0 4px;
}
.pokedex-name-en {
  font-size: 12px;
  font-weight: 400;
  color: #b09a84;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 0 0 6px;
  text-transform: none;
}
.pokedex-cat {
  font-size: 14px;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
}
.pokedex-stat {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  font-size: 14px;
  letter-spacing: 1px;
}
.pokedex-stat-label {
  color: #1a1a1a;
}
.pokedex-stat-value {
  color: #1a1a1a;
}

/* No. 표기 — 커피 이름 아래 인라인 */
.pokedex-no {
  font-size: 14px;
  letter-spacing: 1px;
}
.pokedex-no-num {
  font-weight: 700;
  letter-spacing: 2px;
}
/* No. + selling 칩 가로 배치 */
.pokedex-id-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 6px;
}
.pokedex-id-row .pokedex-selling-chip {
  margin: 0;
  align-self: center;
}

/* 심플 디바이더 — 얇은 가로선 한 줄 */
.pokedex-divider {
  height: 0;
  margin: 20px 0 22px;
  border-top: 1px solid #1a1a1a;
  background: none;
}
.pokedex-divider-line,
.pokedex-divider-boxes {
  display: none;
}

/* 본문 설명 — 팀/멤버 코멘트 말풍선과 동일한 글꼴 */
.pokedex-desc {
  display: none;
}
.pokedex-desc--placeholder {
  color: var(--mid);
  font-style: italic;
}

/* 관리자 — 메뉴 설명 편집 */
.pokedex-desc-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: white;
  color: var(--dark);
  cursor: pointer;
  margin-bottom: 18px;
  font-family: inherit;
}

/* 타이틀 옆 인라인 배치 */
.pokedex-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 4px;
}
.pokedex-title-row .pokedex-name { margin: 0; }
.pokedex-desc-edit-btn--inline {
  font-size: 10px;
  padding: 2px 8px;
  border-width: 1px;
  margin-bottom: 0;
  gap: 2px;
}
.pokedex-desc-edit-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pokedex-desc-edit-btn[hidden] {
  display: none;
}
.pokedex-desc-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.pokedex-desc-textarea {
  width: 100%;
  font-family: 'Poor Story', cursive;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.2px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  min-height: 96px;
  box-sizing: border-box;
  color: #1a1a1a;
}
.pokedex-desc-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.pokedex-desc-editor-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.pokedex-desc-cancel-btn,
.pokedex-desc-save-btn {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  font-family: inherit;
}
.pokedex-desc-cancel-btn {
  border: 1.5px solid var(--border);
  background: white;
  color: var(--mid);
}
.pokedex-desc-cancel-btn:hover {
  border-color: var(--mid);
}
.pokedex-desc-save-btn {
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: white;
}
.pokedex-desc-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 관리자 — 메뉴 이름 편집 */
.pokedex-name-input {
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1.1;
  margin: 0 0 4px;
  padding: 2px 6px;
  width: 100%;
  box-sizing: border-box;
  border: 1.5px dashed var(--accent);
  border-radius: 6px;
  background: #fffaf4;
  color: inherit;
}
.pokedex-name-input:focus {
  outline: none;
  border-style: solid;
}
.pokedex-name-en-input {
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #7a6350;
  margin: 0 0 6px;
  padding: 2px 6px;
  width: 100%;
  box-sizing: border-box;
  border: 1.5px dashed var(--accent);
  border-radius: 6px;
  background: #fffaf4;
  text-transform: none;
}
.pokedex-name-en-input:focus {
  outline: none;
  border-style: solid;
}
@media (max-width: 720px) {
  .pokedex-name-input { font-size: 20px; }
}

/* 관리자 — 메뉴 이미지 업로드 오버레이 */
.pokedex-img--editing {
  position: relative;
}
.pokedex-img-upload {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: inherit;
  transition: background 0.15s;
}
.pokedex-img-upload:hover {
  background: rgba(0, 0, 0, 0.6);
}
.pokedex-img-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.pokedex-img-upload span {
  padding: 6px 12px;
  border: 1.5px solid white;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.25);
}

/* 코멘트 섹션은 기존 스타일 유지 */
.pokedex-card .coffee-modal-section {
  border-top: 1px solid #1a1a1a;
  padding-top: 14px;
  margin-top: 28px;
}
/* divider 직후 첫 섹션(=팀 코멘트)은 위 구분선 없음 — pokedex-divider 가 이미 구분 역할 */
.pokedex-card .pokedex-divider + .coffee-modal-section {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* 모바일 — 세로 정렬 */
@media (max-width: 720px) {
  /* 모바일은 이미지 크게 보여주기 위해 세로 스택 */
  .pokedex-top {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .pokedex-img-wrap {
    width: 70%;
    max-width: 280px;
    margin: 0 auto;
  }
  .pokedex-img {
    width: 100%;
  }
  .pokedex-name { font-size: 20px; }
  .pokedex-cat { font-size: 12px; }
  .pokedex-stat { font-size: 12px; grid-template-columns: 48px 1fr; gap: 12px; }
  .pokedex-no { font-size: 12px; }
  /* 디바이더 — 좁은 화면에서도 8개가 카드 안에 맞도록 축소 */
  .pokedex-divider {
    margin: 14px 0 16px;
    height: 22px;
    min-width: 0;
  }
  .pokedex-divider-boxes { gap: 10px; }
  .pokedex-divider-boxes span {
    width: 12px;
    height: 12px;
    box-shadow: 1.5px 1.5px 0 0 #1a1a1a;
  }
}

/* ─────────────────────────────────────────────────────────
   Pokedex — 커피 디테일 페이지 적용 (coffee/detail.html)
   ───────────────────────────────────────────────────────── */
.pokedex-card--page {
  height: auto;
  /* width: 100% (기본 .pokedex-card) + margin 이 동시에 적용되면 border-box가
     부모 콘텐츠 폭보다 커져 우측으로 밀림 → margin 이 반영되도록 auto 로 */
  width: auto;
  max-width: 720px;
  margin: 0 auto 60px;
  border: 1.5px solid #1a1a1a;
  border-radius: 14px;
  padding: 56px 22px 32px;
  box-shadow:
    inset 0 0 0 4px #faf8f5,
    inset 0 0 0 5.5px #1a1a1a;
}

/* selling 칩 — pokedex-cat 옆에 인라인 */
.pokedex-selling-chip {
  display: inline-block;
  align-self: flex-start;
  margin: 2px 0 4px;
  padding: 5px 8px 3px;
  border: 1px solid #8a4a1f;
  background: #8a4a1f;
  color: #faf8f5;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 1px;
  border-radius: 2px;
}

/* 메뉴 소개 카드 — 카테고리 라벨 숨김 (이름 바로 아래 공간 정리) */
.menu-guide-desc .pokedex-cat {
  display: none;
}

/* 원두 선택 칩 — ESPRESSO 라벨 아래, 설명/코멘트 스위처 */
.pokedex-bean-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 10px;
}
.pokedex-bean-chip {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 9px 3px;
  border: 1.5px solid #1a1a1a;
  background: #faf8f5;
  color: #1a1a1a;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 2px 2px 0 0 #1a1a1a;
  transition: transform 100ms ease, box-shadow 100ms ease, background 100ms ease, color 100ms ease;
}
.pokedex-bean-chip:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 0 #1a1a1a;
}
.pokedex-bean-chip:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 #1a1a1a;
}
.pokedex-bean-chip.active {
  background: #8a4a1f;
  color: #faf8f5;
  border-color: #1a1a1a;
}

/* 액션 버튼 행 — divider 바로 아래 */
.pokedex-action-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
/* 메타 우하단 — 수집 버튼(+관리자 수정/삭제) 우측 정렬 */
.pokedex-meta-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  flex-wrap: wrap;
}

/* ── 상세 페이지 기록 버튼 (V4 디자인 일관) ─────────────────
   메인 띠지의 .btn-collect와 동일한 outline 칩.
   상세 페이지에서는 좀 더 큰 사이즈로 강조 */
.pokedex-collect {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #fff 0%, #fff5ec 100%);
  color: #e8600a;
  border: 1.5px solid #e8600a;
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: none;
  opacity: 1;
  width: auto;
  transition: all 0.15s ease;
  text-transform: none;
}
.pokedex-collect svg { width: 14px; height: 14px; color: #e8600a; }
.pokedex-collect:hover {
  background: #e8600a;
  color: #fff;
  transform: none;
  box-shadow: none;
}
.pokedex-collect:hover svg { color: #fff; }
.pokedex-collect:active { transform: none; box-shadow: none; }
.pokedex-collect.collected {
  background: linear-gradient(135deg, #fff 0%, #f5f3ef 100%);
  color: #888;
  border-color: #b8b0a4;
  font-size: 11px;
  padding: 7px 14px;
}
.pokedex-collect.collected svg { width: 14px; height: 14px; color: #888; }
.pokedex-collect::after,
.pokedex-collect.collected::after { content: none; }
.pokedex-collect.collected:hover {
  background: #888;
  color: #fff;
  border-color: #888;
}
.pokedex-collect.collected:hover svg { color: #fff; }
.pokedex-collect.collected:active { transform: none; box-shadow: none; }
.pokedex-collect:disabled {
  cursor: default;
  pointer-events: none;
}
/* 이미 기록된(disabled) 상태는 hover 색 변화 없이 회색 유지 */
.pokedex-collect:disabled:hover,
.pokedex-collect.collected:disabled:hover {
  background: linear-gradient(135deg, #fff 0%, #f5f3ef 100%);
  color: #888;
  border-color: #b8b0a4;
  transform: none;
  box-shadow: none;
}
.pokedex-collect:disabled:hover svg,
.pokedex-collect.collected:disabled:hover svg { color: #888; }

/* 메타 영역 안 fact 정보 stack */
.pokedex-meta-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}
.pokedex-meta-stats .pokedex-stat {
  grid-template-columns: 64px 1fr;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 3px 0;
  border-bottom: 1px dashed #d4cfc4;
  text-transform: none;
}
.pokedex-meta-stats .pokedex-stat:last-child { border-bottom: none; }
.pokedex-meta-stats .pokedex-stat-label {
  color: #4a4a4a;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.5px;
  align-self: center;
}
.pokedex-meta-stats .pokedex-stat-value {
  color: #1a1a1a;
}
.roastery-insta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 6px;
  vertical-align: -2px;
  color: #c13584;
  border-radius: 4px;
  transition: transform 0.15s ease;
}
.roastery-insta-btn:hover {
  transform: translateY(-1px);
}
.roastery-insta-btn svg {
  width: 100%;
  height: 100%;
}
.region-map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 6px;
  vertical-align: -2px;
  color: #ea4335;
  border-radius: 4px;
  transition: transform 0.15s ease;
}
.region-map-btn:hover {
  transform: translateY(-1px);
}
.region-map-btn svg {
  width: 100%;
  height: 100%;
}

/* 모바일 */
@media (max-width: 720px) {
  .pokedex-card--page {
    padding: 40px 12px 22px;
    border-radius: 10px;
    margin: 0 6px 40px;
    /* 내부 자식(디바이더 등)이 카드 폭을 밀어내지 않도록 */
    min-width: 0;
    overflow-x: clip;
  }
  .coffee-detail-page {
    padding: 16px 8px 60px;
  }
  .pokedex-meta-stats .pokedex-stat {
    grid-template-columns: 56px 1fr;
    font-size: 13px;
  }
}

/* ─────────────────────────────────────────────────────────
   커피 이미지 업로드 (어드민 — 등록/수정 폼)
   ───────────────────────────────────────────────────────── */
.coffee-image-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.coffee-image-upload-preview {
  width: 120px;
  height: 120px;
  border: 1.5px dashed #c4bfb4;
  border-radius: 6px;
  background: #f5f2ec;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.coffee-image-upload-preview.has-image {
  border-style: solid;
  border-color: #1a1a1a;
  background: #1a1a1a;
}
.coffee-image-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.coffee-image-upload-preview.has-image img {
  display: block;
}
.coffee-image-upload-placeholder {
  font-size: 11px;
  color: #8a857a;
  letter-spacing: 0.5px;
}
.coffee-image-upload-preview.has-image .coffee-image-upload-placeholder {
  display: none;
}
.coffee-image-upload-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.coffee-image-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #1a1a1a;
  color: #faf8f5;
  border: 1.2px solid #1a1a1a;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 0.3px;
  cursor: pointer;
  user-select: none;
}
.coffee-image-upload-btn:hover {
  background: #333;
}
.coffee-image-upload-clear {
  padding: 6px 10px;
  background: #faf8f5;
  color: #c0392b;
  border: 1.2px solid #c0392b;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.coffee-image-upload-clear:hover {
  background: #c0392b;
  color: #faf8f5;
}
.coffee-image-upload-hint {
  margin: 0;
  font-size: 11px;
  color: #8a857a;
}

/* ── 졸라맨 마시는 애니메이션 (analysis 컵 일러스트) ─────────────
   .analysis-cup-illustration 컨테이너에 .drinking / .drunk 클래스 토글로 상태 전환
   bindDrinkStage() 참고 */
.analysis-cup-illustration {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.analysis-cup-illustration .cups-stack { pointer-events: none; }

/* 컵 기울임: 기본 업라이트(0°), 마실 때 입쪽으로 -35° */
.analysis-cup-illustration .cup-tilt {
  transform-box: view-box;
  transform-origin: 215px 266px;
  transform: rotate(0deg);
  transition: transform 0.35s cubic-bezier(0.45, 0.05, 0.3, 1);
}
.analysis-cup-illustration.drinking .cup-tilt {
  transform: rotate(-35deg);
}

/* 커피 fill: scaleY로 액체 높이 드레인
   - 기본(복귀, 리필): 빠르게 0.25s
   - drinking 중(드레인): 기존 슬로우 0.95s (+ 0.2s delay) 유지 */
.analysis-cup-illustration .coffee-fill-wrap {
  transform-box: view-box;
  transform-origin: 215px 266px;
  transform: scaleY(1);
  transition: transform 0.25s cubic-bezier(0.2, 0.6, 0.3, 1);
}
.analysis-cup-illustration.drinking .coffee-fill-wrap,
.analysis-cup-illustration.drunk .coffee-fill-wrap {
  transform: scaleY(0);
}
.analysis-cup-illustration.drinking .coffee-fill-wrap {
  transition: transform 0.95s cubic-bezier(0.55, 0, 0.7, 0.4) 0.2s;
}

/* 표정 — 점눈/미소 ↔ 별눈/큰 웃음
   - drinking 진입: delay 0.25s (기존 유지)
   - 복귀(drunk 해제, default): delay 0.2s 로 단축해 표정 빈 구간 제거 */
.analysis-cup-illustration .mouth-smile { opacity: 1; transition: opacity 0.2s 0.2s; }
.analysis-cup-illustration .mouth-open  { opacity: 0; transition: opacity 0.2s 0.2s; }
.analysis-cup-illustration.drinking .mouth-smile { opacity: 0; transition-delay: 0.25s; }
.analysis-cup-illustration.drinking .mouth-open  { opacity: 1; transition-delay: 0.25s; }

.analysis-cup-illustration .eye-dot { transition: opacity 0.2s 0.2s; }
.analysis-cup-illustration .eye-star { opacity: 0; transition: opacity 0.2s 0.2s; }
.analysis-cup-illustration.drinking .eye-dot  { opacity: 0; transition-delay: 0.25s; }
.analysis-cup-illustration.drinking .eye-star { opacity: 1; transition-delay: 0.25s; }

/* 커피 스트림 방울 */
.analysis-cup-illustration .stream-drop { opacity: 0; }
.analysis-cup-illustration.drinking .stream-drop {
  animation: rbcStreamFall 0.75s cubic-bezier(0.4, 0, 0.7, 0.4) infinite;
}
.analysis-cup-illustration.drinking .stream-drop:nth-child(2) { animation-delay: 0.18s; }
.analysis-cup-illustration.drinking .stream-drop:nth-child(3) { animation-delay: 0.36s; }
.analysis-cup-illustration.drinking .stream-drop:nth-child(4) { animation-delay: 0.54s; }
@keyframes rbcStreamFall {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.6); }
  15%  { opacity: 1; transform: translate(0, 0) scale(1); }
  85%  { opacity: 1; transform: translate(-20px, 34px) scale(0.9); }
  100% { opacity: 0; transform: translate(-24px, 38px) scale(0.6); }
}

/* 김 — 기본 상태에서 솔솔, drunk 시 사라짐 */
.analysis-cup-illustration .steam {
  animation: rbcSteamRise 2.2s ease-in-out infinite;
  transition: opacity 0.3s;
}
.analysis-cup-illustration .steam path:nth-child(2) { animation-delay: 0.4s; }
.analysis-cup-illustration .steam path:nth-child(3) { animation-delay: 0.8s; }
.analysis-cup-illustration.drunk .steam {
  animation: none;
  opacity: 0;
}
@keyframes rbcSteamRise {
  0%,100% { transform: translate(0, 0); opacity: 0.2; }
  40%     { opacity: 0.7; }
  50%     { transform: translate(0, -6px); }
}

/* ============================================================
   메뉴 소개 — 모바일 아코디언 (max-width: 540px)
   탭한 메뉴 바로 아래로 상세 pokedex-card를 inline 확장.
   바디에 .menu-variant-accordion-active 클래스가 JS로 부여될 때만 활성.
   ============================================================ */
@media (max-width: 540px) {
  .menu-variant-accordion-active .notebook-page-left {
    aspect-ratio: auto !important;
    overflow: visible !important;
  }
  .menu-variant-accordion-active .menu-guide-col {
    flex-direction: column;
    gap: 18px;
  }
  .menu-variant-accordion-active .menu-guide-col-left,
  .menu-variant-accordion-active .menu-guide-col-right {
    padding: 0 !important;
    gap: 14px;
  }
  .menu-variant-accordion-active .menu-guide-category {
    margin-top: 8px;
  }
  /* 모바일에서는 메뉴판 카드 기울기 제거 — 가독성 우선 */
  .menu-variant-accordion-active .menu-guide-category,
  .menu-variant-accordion-active .menu-guide-category::before {
    transform: none !important;
  }

  /* 원본 상세 패널 숨김 — 상세는 각 li 아래로 이동 */
  .menu-variant-accordion-active .notebook-page-right { display: none !important; }
  .menu-variant-accordion-active .notebook-spine { display: none !important; }

  /* li 아래에 삽입된 상세 카드 */
  .menu-variant-accordion-active .menu-guide-desc {
    display: none;
    position: static;
    width: 100%;
    margin: 6px 0 2px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    animation: none;
  }
  .menu-variant-accordion-active .menu-guide-desc.active {
    display: block;
    animation: menu-accordion-expand 0.22s ease-out;
  }
  .menu-variant-accordion-active .menu-guide-desc .pokedex-card {
    margin: 0;
    border-radius: 10px;
    position: relative;
    padding: 14px 14px 16px !important;
  }
  /* 상세 내부 요소 — 좁은 폭에 맞춘 컴팩트 스타일 */
  .menu-variant-accordion-active .menu-guide-desc .pokedex-top {
    gap: 12px !important;
  }
  .menu-variant-accordion-active .menu-guide-desc .pokedex-img,
  .menu-variant-accordion-active .menu-guide-desc .pokedex-img-placeholder {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
  }
  .menu-variant-accordion-active .menu-guide-desc .pokedex-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
  }
  .menu-variant-accordion-active .menu-guide-desc .pokedex-meta {
    padding-right: 30px; /* × 버튼 자리 확보 */
  }
  .menu-variant-accordion-active .menu-guide-desc .pokedex-name {
    font-size: 17px !important;
    line-height: 1.25 !important;
    margin: 0 0 2px !important;
  }
  .menu-variant-accordion-active .menu-guide-desc .pokedex-name-en {
    font-size: 11px !important;
    margin-top: 0 !important;
  }
  /* 카테고리 라벨 — 이미 스티커 안이라 중복, 숨김 */
  .menu-variant-accordion-active .menu-guide-desc .pokedex-cat {
    display: none !important;
  }
  .menu-variant-accordion-active .menu-guide-desc .pokedex-bean-chips {
    gap: 4px !important;
    margin-top: 6px !important;
    flex-wrap: wrap;
  }
  .menu-variant-accordion-active .menu-guide-desc .pokedex-bean-chip {
    font-size: 11px !important;
    padding: 3px 9px !important;
  }
  .menu-variant-accordion-active .menu-guide-desc .pokedex-divider {
    margin: 10px 0 !important;
    transform: scale(0.85);
    transform-origin: left center;
  }
  .menu-variant-accordion-active .menu-guide-desc .pokedex-desc {
    font-size: 14.5px !important;
    line-height: 1.6 !important;
    margin: 4px 0 0 !important;
    color: #3a2a1a;
  }
  .menu-variant-accordion-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(255,255,255,0.92);
    border: 1px solid #e8ddc9;
    border-radius: 999px;
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    color: #7a5a40;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .menu-variant-accordion-active .menu-guide-item.active {
    border-radius: 6px 6px 0 0;
  }

  /* ── 포커스 딤 — 상세 열림 시 다른 카테고리·형제 아이템 흐리게 ── */
  .menu-variant-accordion-active .menu-guide-category {
    transition: opacity 0.22s ease;
  }
  .menu-variant-accordion-active .menu-guide-category.is-dimmed {
    opacity: 0.32;
  }
  .menu-variant-accordion-active .menu-guide-item {
    transition: opacity 0.2s ease;
  }
  .menu-variant-accordion-active .menu-guide-item.is-dimmed {
    opacity: 0.45;
  }
}
@keyframes menu-accordion-expand {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── MENU DETAIL PAGE ─────────────────────────────────────────── */
.menu-detail-page .page-content-scroll {
  padding: 24px var(--gutter) 48px;
}

.menu-detail-container {
  position: relative;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.menu-detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  padding: 8px 12px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.menu-detail-back-btn:hover {
  color: var(--black);
  background: rgba(0,0,0,0.03);
}

.menu-detail-card {
  display: block;
  width: 100%;
}

.menu-detail-card .pokedex-card {
  width: 100%;
  max-width: 100%;
}

.pokedex-review-btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pokedex-review-btn:hover {
  color: var(--black);
  border-color: var(--black);
  background: rgba(0,0,0,0.02);
}

@media (max-width: 540px) {
  .menu-detail-page .page-content-scroll {
    padding: 16px var(--gutter) 40px;
  }

  .menu-detail-back-btn {
    margin-bottom: 12px;
    padding: 6px 8px;
    margin-left: -8px;
  }

  .menu-detail-card .pokedex-card {
    padding: 20px 18px 24px;
  }

  .menu-detail-card .pokedex-img {
    width: 55%;
    max-width: 200px;
    margin: 0 auto;
  }
}

/* ============================================================
   ACTIVITY 준비중 페이지
   ============================================================ */
.activity-coming {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--gutter) 80px;
}

.activity-coming-inner {
  text-align: center;
  max-width: 360px;
}

.brew-anim {
  width: 260px;
  height: 260px;
  display: block;
  margin: 0 auto 24px;
}

.activity-coming-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--black);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.activity-coming-desc {
  font-size: 14px;
  color: var(--mid);
  letter-spacing: 0.02em;
  line-height: 1.6;
}

/* ── 떨어지는 물방울 애니메이션 ─────────────────────────── */
.brew-drops .drop {
  opacity: 0;
  animation: brew-drop-fall 1.6s ease-in infinite;
}

.brew-drops .drop-2 { animation-delay: 0.8s; }

@keyframes brew-drop-fall {
  0%   { opacity: 0; transform: translateY(0); }
  15%  { opacity: 1; }
  80%  { opacity: 1; transform: translateY(54px); }
  100% { opacity: 0; transform: translateY(64px); }
}

/* ── 컵에 커피 차오르는 애니메이션 ──────────────────────── */
.brew-coffee,
.brew-coffee-top {
  animation: brew-coffee-fill 3.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes brew-coffee-fill {
  0%, 5% { transform: translateY(36px); }
  70%, 100% { transform: translateY(0); }
}

/* ── 김 모락모락 ───────────────────────────────────────── */
.brew-steam .steam {
  transform-origin: center bottom;
  opacity: 0;
  animation: brew-steam-rise 2.6s ease-out infinite;
}

.brew-steam .steam-2 { animation-delay: 0.6s; }
.brew-steam .steam-3 { animation-delay: 1.2s; }

@keyframes brew-steam-rise {
  0% { opacity: 0; transform: translateY(10px) scaleY(0.7); }
  25% { opacity: 0.55; }
  100% { opacity: 0; transform: translateY(-22px) scaleY(1.15); }
}

@media (max-width: 768px) {
  .brew-anim { width: 220px; height: 220px; }
  .activity-coming-title { font-size: 24px; }
  .activity-coming-desc { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .brew-drops .drop,
  .brew-coffee,
  .brew-coffee-top,
  .brew-steam .steam {
    animation: none;
  }
}
