/* =====================================================================
   ROUND 2 — 따뜻한 한국 찻집 톤 (사용자 피드백 반영)
   차가운 슬레이트/갤러리 문법 → 한지·종이·말차·클레이.
   구조·사진·계산기·접근성은 유지하고 색과 질감만 되돌린다.
   ===================================================================== */

:root {
  --bg: #f4eddf;
  --surface: #ebe1ce;
  --ink: #221e17;
  --muted: #5c5447;
  --accent: #33452a;
  --accent-ink: #f7f2e6;
  --field-1: #f4eddf;
  --field-2: #e4e9dc;
  --field-3: #eedfd8;
  --field-4: #33452a;

  --paper: var(--bg);
  --paper-2: var(--surface);
  --paper-3: #e7ddcb;
  --card: #fbf6ec;
  --ink-soft: var(--ink);
  --line: transparent;
  --line-strong: transparent;
  --matcha: #4f6b3f;
  --matcha-deep: #33452a;
  --matcha-tint: #e4e9dc;
  --amber: #b06b35;
  --amber-tint: #f1e4d3;
  --clay: #8a4b3a;
  --clay-tint: #eedfd8;
  --focus: #33452a;
  color-scheme: light;
}

html,
body {
  background: var(--bg);
  color: var(--ink);
}

.site-header {
  background: var(--bg);
}

.site-footer {
  background: #33452a;
  color: #f7f2e6;
}

.site-footer,
.site-footer p,
.site-footer a {
  color: #f7f2e6;
}

/* ---- hero: photo + paper panel, seal ---- */

.tp-hero {
  background: var(--bg);
}

.tp-hero__panel {
  background: var(--bg);
  color: var(--ink);
}

.tp-hero h1,
.tp-hero__what,
.tp-hero__links,
.tp-hero__links a {
  color: var(--ink);
}

.tp-hero__fact {
  background: var(--surface);
  color: var(--ink);
  padding: 18px 20px;
  max-width: 34ch;
}

.tp-hero__fact p,
.tp-hero__fact a {
  color: var(--ink);
}

.tp-hero__fact-big {
  color: var(--clay);
  font-size: 24px;
}

.tp-hero__links a {
  text-decoration-color: var(--clay);
}

.tp-hero__caption {
  background: rgba(34, 30, 23, 0.8);
  color: #f7f2e6;
}

.tp-hero {
  border-bottom: 6px solid var(--clay);
}

.tp-seal {
  position: absolute;
  top: 34px;
  right: 28px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 54px;
  background: var(--clay);
  color: #f7f2e6;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  rotate: -4deg;
}

.tp-hero__panel {
  position: relative;
}

/* ---- buttons / links / forms ---- */

.tp-btn,
.btn {
  background: #33452a;
  color: #f7f2e6;
}

.tp-btn:hover,
.tp-btn:focus-visible,
.btn:hover {
  background: #263620;
  color: #fff;
}

.tp-link,
.tp-hero__links a {
  color: var(--ink);
  text-decoration-color: var(--clay);
}

.tp-link:hover {
  color: var(--clay);
}

/* ---- fields and frames ---- */

.tp-stats__photo,
.tp-frame__art,
.tp-cta__strip figure {
  background: var(--field-2);
}

.tp-frame:nth-child(2n) .tp-frame__art { background: var(--field-3); }
.tp-frame:nth-child(3n) .tp-frame__art { background: var(--surface); }
.tp-frame:nth-child(4n) .tp-frame__art { background: var(--field-2); }

.tp-scale {
  background: var(--field-2);
}

.tp-scale select {
  background: #fbf6ec;
  border-color: #b9ad98;
}

.tp-cta__band {
  background: #33452a;
  color: #f7f2e6;
}

.tp-cta h2,
.tp-cta h2 a,
.tp-cta__lines {
  color: #f7f2e6;
}

.tp-cta h2 a {
  text-decoration-color: #d6c4b8;
}

/* ---- app screens (same warm paper) ---- */

.tea-card,
.review-card,
.archive-card,
.vendor-card,
.brand-card {
  background: #fbf6ec !important;
}

.tea-card__art,
.art {
  background: var(--field-2) !important;
}

.btn--ghost {
  background: var(--field-2);
  color: var(--ink);
}

.chip {
  background: var(--field-2);
  color: var(--ink);
}

.input,
select,
textarea {
  background: #fbf6ec;
  border-color: #b9ad98;
  color: var(--ink);
}

/* warm round: tighter hero with a data line and a Korean seal rhythm */
.tp-hero {
  min-height: min(68svh, 660px);
}
.tp-hero__data {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 0.01em;
}
.tp-hero__foot {
  margin-top: 6px;
}
@media (max-width: 768px) {
  .tp-hero { grid-template-rows: 40svh auto; }
  .tp-hero__media { min-height: 40svh; }
}

/* Korean editorial: hide English eyebrow labels on app screens (they read as template chrome) */
.eyebrow {
  display: none !important;
}

/* classic home: Korean-friendly search, category shortcuts, photo strip */
.home-search {
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin: 22px 0 14px;
}
.home-search .input {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 0 14px;
  font-size: 16px;
  background: #fbf6ec;
  border: 1px solid #b9ad98;
  border-radius: 2px;
  color: var(--ink);
}
.home-search .btn {
  min-height: 48px;
  border-radius: 2px;
  flex: none;
}
.home-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
}
.home-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  background: var(--field-2);
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
  border-radius: 2px;
}
.home-cat:hover {
  background: var(--matcha);
  color: #fff;
}
.home-cat span {
  color: var(--muted);
  font-size: 13px;
}
.home-cat:hover span {
  color: rgba(255, 255, 255, 0.82);
}
.home-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.home-photos figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--field-2);
}
.home-photos figcaption,
.home-photos__credit {
  font-size: 15px;
  color: var(--muted);
}
.home-photos__credit {
  margin: 12px 0 0;
}
.home-photos__credit a {
  color: var(--ink);
  text-decoration: underline;
}
.region-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  background: var(--field-2);
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
  border-radius: 2px;
}
.pill:hover {
  background: var(--matcha);
  color: #fff;
}
.pill span {
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 768px) {
  .home-search { max-width: none; }
  .home-photos { grid-template-columns: 1fr 1fr; }
  .home-photos figure:nth-child(3) { display: none; }
}

/* classic Korean home: denser stat cells + four-up photo strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: clamp(28px, 4vw, 44px);
}
.stat {
  background: #fbf6ec;
  padding: 18px 20px;
  border-radius: 2px;
}
.stat__label {
  font-size: 15px;
  color: var(--muted);
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 38px);
  margin: 2px 0 0;
}
.home-photos {
  grid-template-columns: repeat(4, 1fr);
}
.home-photos figure:nth-child(3) {
  display: flex;
}
@media (max-width: 900px) {
  .home-photos { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* 좋은 판매처: hero 답변, 홈 랭킹, 기준 배너 */
.hero-answer {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--ink);
}
.hero-answer strong {
  color: var(--clay);
}
.hero-answer a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--clay);
  text-underline-offset: 3px;
  white-space: nowrap;
}
.vendor-rank {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.vendor-rank li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1.4fr) auto minmax(0, 2.6fr) auto;
  gap: 10px 14px;
  align-items: center;
  background: #fbf6ec;
  padding: 14px 16px;
  border-radius: 2px;
}
.vendor-rank__num {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--clay);
  text-align: center;
}
.vendor-rank__name {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.vendor-rank__name:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.vendor-rank__score {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--matcha-deep);
  white-space: nowrap;
}
.vendor-rank__reasons {
  font-size: 14px;
  color: var(--muted);
}
.vendor-rank__meta {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.vendor-rank__criteria {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.vendor-rank__criteria a {
  color: var(--ink);
  text-decoration: underline;
}
.vendor-criteria {
  margin: 22px 0 0;
  padding: 18px 20px;
  background: #fbf6ec;
  border-radius: 2px;
}
.vendor-criteria h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 20px;
}
.vendor-criteria p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.vendor-criteria ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.vendor-criteria li {
  background: var(--field-2);
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 2px;
}
.badge--quality {
  background: var(--matcha-deep);
  color: #fff;
}
.vendor-card__quality {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .vendor-rank li {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }
  .vendor-rank__reasons { grid-column: 2 / 4; }
  .vendor-rank__meta { grid-column: 2 / 4; text-align: left; }
}

/* 신뢰성: 판매처는 평가·순위가 아니라 확인된 사실만 표시 */
.vendor-recent {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.vendor-recent li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto;
  gap: 8px 16px;
  align-items: center;
  background: #fbf6ec;
  padding: 14px 16px;
  border-radius: 2px;
}
.vendor-recent__name {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.vendor-recent__name:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.vendor-recent__meta {
  font-size: 14px;
  color: var(--muted);
}
.vendor-recent__checked {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.vendor-recent__note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.vendor-recent__note a {
  color: var(--ink);
  text-decoration: underline;
}
@media (max-width: 900px) {
  .vendor-recent li { grid-template-columns: minmax(0, 1fr) auto; }
  .vendor-recent__meta { grid-column: 1 / 3; }
}

/* 홈: 오늘의 차 · 차 종류별 가이드 · 리뷰 기반 추천 */
.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 22px;
}
.today-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 0;
  background: #fbf6ec;
  border-radius: 2px;
  overflow: hidden;
}
.today-card__art {
  display: grid;
  place-items: center;
  min-height: 260px;
  background: var(--field-2);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(56px, 7vw, 96px);
  text-decoration: none;
  line-height: 1.1;
  padding: 20px;
  text-align: center;
  word-break: keep-all;
}
.today-card__body {
  padding: 22px 24px;
}
.today-card__kicker {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--clay);
}
.today-card__name {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.25;
}
.today-card__name a {
  color: var(--ink);
  text-decoration: none;
}
.today-card__name a:hover { text-decoration: underline; text-underline-offset: 5px; }
.today-card__facts,
.today-card__rating {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--muted);
}
.today-card__rating { color: var(--clay); }
.today-card__desc {
  margin: 10px 0 16px;
  font-size: 16px;
  line-height: 1.65;
}
.today-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.today-note {
  background: var(--field-2);
  padding: 22px 24px;
  border-radius: 2px;
}
.today-note__label {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}
.today-note__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.35;
}
.today-note__body {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.7;
}
.today-note__meta {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.guide-card {
  background: #fbf6ec;
  padding: 18px;
  border-radius: 2px;
}
.guide-card__count {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--clay);
}
.guide-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
}
.guide-card h3 a { color: var(--ink); text-decoration: none; }
.guide-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.guide-card__examples {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
}
.guide-card__links {
  display: flex;
  gap: 12px;
  margin: 0;
  font-size: 14px;
}
.guide-card__links a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.reco-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.reco-card {
  background: #fbf6ec;
  padding: 18px;
  border-radius: 2px;
}
.reco-card__evidence {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--clay);
}
.reco-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 21px;
}
.reco-card h3 a { color: var(--ink); text-decoration: none; }
.reco-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.reco-card__meta { margin: 0; font-size: 14px; color: var(--muted); }
.reco-empty {
  margin-top: 20px;
  padding: 22px 24px;
  background: var(--field-2);
  border-radius: 2px;
}
.reco-empty p { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.reco-empty__title { color: var(--ink) !important; font-family: var(--font-display); font-size: 22px !important; }
@media (max-width: 1000px) {
  .today-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reco-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .today-card { grid-template-columns: 1fr; }
  .today-card__art { min-height: 150px; font-size: 56px; }
  .guide-grid, .reco-grid { grid-template-columns: 1fr; }
}

/* 오늘의 차: 글리프가 본문을 침범하지 않도록 */
.today-card__art {
  overflow: hidden;
  font-size: clamp(38px, 3.2vw, 50px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  padding: 16px;
}

/* 리뷰 동선: 목록 상단 안내 */
.review-callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: #fbf6ec;
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: 2px;
}
.review-callout strong {
  font-family: var(--font-display);
  font-size: 19px;
}
.review-callout p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 72ch;
}
.review-callout .btn {
  flex: none;
}

/* 감각 5축 상단 요약 + 주간 노트 + 공유 */
.detail-sensory-top {
  margin: 10px 0 14px;
}
.sensory-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 10px 12px;
  background: var(--field-2);
  border-radius: 2px;
}
.sensory-top__label {
  font-size: 14px;
  color: var(--muted);
  margin-right: 2px;
}
.sensory-top .sensory-chip {
  background: #fbf6ec;
}
.sensory-top__meta {
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
}
.sensory-top--empty {
  color: var(--muted);
  font-size: 14px;
}
.sensory-top__empty-text {
  margin-right: auto;
}
.weekly-note__meta {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.weekly-note__meta a {
  color: var(--ink);
  text-decoration: underline;
}

/* =====================================================================
   emilkowalski/skills 감사 반영 — motion & mobile-native
   기준: emil-design-eng / improve-animations / review-animations / mobile-native
   원칙: 자주 보는 것엔 모션 최소화, UI는 300ms 이하, GPU(transform/opacity)만,
   hover는 포인터가 있을 때만, reduced-motion에서 이동은 끄고 색/투명도는 유지.
   ===================================================================== */

:root {
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out-strong: cubic-bezier(0.77, 0, 0.175, 1);
}

/* 1) 모든 경로 전환에 붙던 0.4s 페이드 제거 (자주 보는 화면 전환, 300ms 초과) */
.view {
  animation: none;
}

/* 2) gap(레이아웃 속성) 애니메이션 제거 — 아이콘 transform으로만 */
.section-head__action {
  transition: color 160ms ease, border-color 160ms ease;
}
.section-head__action:hover {
  gap: 6px;
}
.section-head__action .icon {
  transition: transform 160ms var(--ease-out-strong);
}
.region-card .section-head__action {
  transition: color 160ms ease, border-color 160ms ease;
}

/* 3) 모바일 네이티브: 탭 하이라이트 제거 + 누름 피드백 */
html {
  -webkit-tap-highlight-color: transparent;
}
button,
.btn,
.home-cat,
.pill,
.guide-card,
.today-card,
.reco-card {
  -webkit-user-select: none;
  user-select: none;
}
.home-cat:active,
.pill:active,
.guide-card:active,
.today-card:active,
.reco-card:active {
  transform: scale(0.995);
}

/* 4) hover 모션은 포인터가 있는 기기에서만 */
@media (hover: hover) and (pointer: fine) {
  .section-head__action:hover .icon {
    transform: translateX(3px);
  }
  .today-card,
  .guide-card,
  .reco-card,
  .review-callout {
    transition: transform 180ms var(--ease-out-strong), background-color 180ms ease;
  }
  .today-card:hover,
  .guide-card:hover,
  .reco-card:hover {
    transform: translateY(-2px);
  }
}
@media (hover: none), (pointer: coarse) {
  .tea-card:hover,
  .vendor-card:hover,
  .brand-card:hover,
  .archive-card:hover,
  .review-card:hover,
  .hero-card:hover,
  .region-card:hover,
  .today-card:hover,
  .guide-card:hover,
  .reco-card:hover {
    transform: none;
  }
}

/* 5) 상태 변화(리뷰 저장/오류)는 즉시 튀지 않고 짧게 들어옴 */
@keyframes notice-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.notice {
  animation: notice-in 160ms var(--ease-out-strong) both;
}

/* 6) iOS 입력 확대 방지 (15px → 16px, 터치 기기 한정) */
@media (pointer: coarse) {
  .input,
  .select,
  .textarea,
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* 7) reduced-motion: 이동은 제거, 색/투명도 피드백은 유지 */
@media (prefers-reduced-motion: reduce) {
  .today-card,
  .guide-card,
  .reco-card,
  .review-callout {
    transition: none;
  }
  .today-card:hover,
  .guide-card:hover,
  .reco-card:hover,
  .home-cat:active,
  .pill:active,
  .guide-card:active,
  .today-card:active,
  .reco-card:active {
    transform: none;
  }
  .notice {
    animation: none;
  }
}
