/* Todaki — home page (토닥이식 절제 + 큰 위계). */

body.todaki-home { background: var(--bg); margin: 0; }

.todaki-home-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--bg);
  font-family: var(--font-kr);
  min-height: 100vh;
}

/* ───────────── Header (sticky, 56px clean) ───────────── */
.todaki-home__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line-softer);
  height: 56px;
}
.todaki-home__brand {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--pink);
  text-decoration: none;
  font-family: var(--font-kr);
}
.todaki-home__header-right {
  display: flex;
  gap: 4px;
  align-items: center;
}
.todaki-home__icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  transition: background var(--t-fast);
  position: relative;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.todaki-home__icon-btn:hover { background: var(--bg-3); }
.todaki-home__bell-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--pink);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

/* ───────────── BIG search bar (토닥이 검색 UX 핵심) ───────────── */
.todaki-home__searchbar-wrap {
  padding: 16px;
  background: var(--bg);
}
.todaki-home__searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 0 18px;
  text-decoration: none;
  color: var(--ink-3);
  font-size: 15px;
  transition: background var(--t-fast);
}
.todaki-home__searchbar:hover { background: var(--bg-3); }
.todaki-home__searchbar .todaki-icon { color: var(--ink-2); }

/* ───────────── Live Reviews ───────────── */
.todaki-live { padding-top: 8px; }
.todaki-live__head {
  padding: 24px 16px 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.todaki-live__pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}
.todaki-live__pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
  animation: todaki-pulse 2s infinite;
}

.todaki-live__tabs {
  padding: 4px 16px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.todaki-live__tabs::-webkit-scrollbar { display: none; }

.todaki-chip__count { margin-left: 4px; font-size: 11px; opacity: 0.7; font-weight: 500; }

/* Featured review */
.todaki-review--featured {
  display: block;
  padding: 18px 16px 20px;
  text-decoration: none;
  color: inherit;
  border-bottom: 8px solid var(--bg-2);
}
.todaki-review__meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.todaki-chip--ghost {
  font-size: 11px;
  padding: 4px 10px;
  background: var(--bg-3);
  border-color: transparent;
  color: var(--ink-2);
  font-weight: 600;
}
.todaki-review__rating {
  font-size: 12px;
  color: var(--pink);
  font-weight: 700;
}
.todaki-review__tag-inline {
  font-size: 12px;
  color: var(--ink-3);
}
.todaki-review__title {
  font: var(--t-h2);
  margin: 0;
  color: var(--ink);
}
.todaki-review__body {
  font: var(--t-body);
  color: var(--ink-2);
  margin: 8px 0 0;
}
.todaki-review__photos {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.todaki-review__photo {
  width: 68px;
  height: 68px;
  border-radius: var(--r-md);
  position: relative;
  background-size: cover;
  background-position: center;
}
.todaki-review__photo-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 17, 0.5);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--r-md);
  backdrop-filter: blur(2px);
}
.todaki-review__foot {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-3);
}
.todaki-review__when { margin-left: auto; }

/* Compact thread list */
.todaki-thread {
  display: block;
  padding: 16px;
  border-bottom: 1px solid var(--line-softer);
  text-decoration: none;
  color: inherit;
  transition: background var(--t-fast);
}
.todaki-thread:hover { background: var(--bg-2); }
.todaki-thread__tag {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.todaki-thread__title {
  font: var(--t-h3);
  margin-top: 6px;
  color: var(--ink);
}
.todaki-thread__body {
  font: var(--t-body);
  color: var(--ink-2);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.todaki-thread__foot {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

/* ───────────── Today's Pick — 큰 카드, 2:3 비율 ───────────── */
.todaki-pick {
  background: var(--bg);
  border-top: 8px solid var(--bg-2);
  padding-top: 8px;
}
.todaki-pick__head { padding: 24px 16px 12px; }
.todaki-pick__rail {
  padding: 4px 16px 28px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.todaki-pick__rail::-webkit-scrollbar { display: none; }

.todaki-pick__card {
  min-width: 200px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.todaki-pick__thumb {
  width: 200px;
  height: 240px;
  border-radius: var(--r-lg);
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.todaki-pick__thumb::after {
  /* Bottom fade for text overlay readability */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}
.todaki-pick__vip {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  z-index: 2;
}
.todaki-pick__rank {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--r);
  font-family: var(--font-num);
  z-index: 2;
}
.todaki-pick__name {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.todaki-pick__meta {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 4px;
}

/* ───────────── Columns 2x2 ───────────── */
.todaki-columns {
  border-top: 8px solid var(--bg-2);
  padding-top: 8px;
}
.todaki-columns__head { padding: 24px 16px 12px; }
.todaki-columns__grid {
  padding: 4px 16px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.todaki-columns__card {
  text-decoration: none;
  color: inherit;
}
.todaki-columns__thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  background-size: cover;
  background-position: center;
}
.todaki-columns__title {
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.todaki-columns__author {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 4px;
}

/* ───────────── Desktop ───────────── */
@media (min-width: 768px) {
  body.todaki-home { background: var(--bg-2); padding: 0; }
  .todaki-home-shell {
    margin: 0 auto;
    box-shadow: 0 0 0 1px var(--line-softer);
    min-height: 100vh;
  }
}

/* ============================================================== */
/* Live Reviews threads (v0.1.8) — title → photos → body w/ 더보기 */
/* ============================================================== */

.todaki-live { background: #fff; }
.todaki-live__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px 16px 10px;
}
.todaki-live__more {
  font-size: 12px;
  color: var(--ink-3, #888);
  text-decoration: none;
  font-weight: 500;
}
.todaki-live__more:hover { color: var(--pink, #FF6680); }

.todaki-threads { display: flex; flex-direction: column; }

/* Override default thread styles for the new layout */
.todaki-thread {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-softer, #eee);
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.todaki-thread__head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-3, #888);
  margin-bottom: 8px;
}
.todaki-thread__nick {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink, #222);
}
.todaki-thread__sep { color: #ccc; }
.todaki-thread__time { font-size: 12px; color: var(--ink-3, #888); }
.todaki-thread__tag {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 2px;
  border-radius: 9999px;
  background: #f4f4f5;
  color: #555;
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.todaki-thread__title-link { display: block; text-decoration: none; color: inherit; }
.todaki-thread__title {
  margin: 0 0 8px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink, #222);
  word-break: break-word;
}

.todaki-thread__photos {
  display: grid;
  gap: 4px;
  margin: 8px 0 10px;
}
.todaki-thread__photos--1 { grid-template-columns: 1fr; }
.todaki-thread__photos--2 { grid-template-columns: 1fr 1fr; }
.todaki-thread__photo { display: block; overflow: hidden; border-radius: 12px; }
.todaki-thread__photo img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Body — overrides legacy clamp */
.todaki-thread__body {
  display: block;
  margin-top: 4px;
}
.todaki-thread__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2, #333);
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  word-break: break-word;
  white-space: pre-wrap;
}
.todaki-thread__more {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  background: none;
  border: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--pink, #FF6680);
  cursor: pointer;
  text-decoration: none;
}
.todaki-thread__more:hover { text-decoration: underline; }

.todaki-thread__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}
.todaki-thread__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
}
.todaki-thread__stat:hover { color: var(--pink, #FF6680); }

/* Empty state inside Live Reviews */
.todaki-live .todaki-empty-state {
  padding: 56px 20px;
  text-align: center;
  color: var(--ink-3, #888);
}
.todaki-live .todaki-empty-state__emoji { font-size: 28px; margin-bottom: 10px; }
.todaki-live .todaki-empty-state__title { font-size: 15px; font-weight: 700; color: var(--ink, #222); margin-bottom: 4px; }
.todaki-live .todaki-empty-state__desc { font-size: 13px; }


/* ===========================================================
 * Todaki v0.2.0 — board chip in title + action row (like/comment/bookmark)
 * =========================================================== */
.todaki-thread__board{
  display:inline-block;
  font-size:11px;
  font-weight:500;
  color:#FF6680;
  background:#FFF0F3;
  border:1px solid #FFD7DE;
  border-radius:999px;
  padding:2px 8px;
  margin-right:6px;
  vertical-align:middle;
  letter-spacing:-.2px;
}
.todaki-thread__title-link{display:block; text-decoration:none; color:inherit;}
.todaki-thread__title{display:inline; margin:0; font-size:15px; font-weight:600; color:#1a1a1a; line-height:1.4; vertical-align:middle;}

.todaki-thread__actions{
  display:flex;
  align-items:center;
  gap:18px;
  padding:8px 0 0;
  margin-top:8px;
  border-top:1px solid #f0f0f0;
}
.todaki-thread__actions .todaki-action{
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:transparent;
  border:0;
  padding:6px 2px;
  color:#888;
  font-size:13px;
  text-decoration:none;
  cursor:pointer;
  transition:color .15s;
  -webkit-tap-highlight-color:transparent;
}
.todaki-thread__actions .todaki-action:hover{color:#FF6680;}
.todaki-thread__actions .todaki-action.is-on{color:#FF6680; font-weight:500;}
.todaki-thread__actions .todaki-action--bookmark{margin-left:auto;}
.todaki-thread__actions .todaki-action svg{display:block;}

/* Today's Pick header — 전체보기 link */
.todaki-pick__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.todaki-pick__more{
  font-size:13px;
  color:#888;
  text-decoration:none;
  white-space:nowrap;
  align-self:center;
}
.todaki-pick__more:hover{color:#FF6680;}

/* /me/ bookmarks tab */
.todaki-mypage-bookmarks{margin-top:16px;}
.todaki-mypage-bookmarks .todaki-thread{margin-bottom:0;}
.todaki-mypage-bookmarks .todaki-empty-state{padding:40px 20px; text-align:center;}


/* ==========================================================================
   Live Reviews — compact thumbnail card (home preview).
   Whole card is an <a> jumping to the topic. No 더보기 / action row here.
   ========================================================================== */
.todaki-threads--compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0 8px;
}
.todaki-thread--compact {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--todaki-border, #f1f1f3);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, transform 0.05s ease;
}
.todaki-thread--compact:hover,
.todaki-thread--compact:focus-visible {
    background: #fafafb;
    text-decoration: none;
    color: inherit;
}
.todaki-thread--compact:active {
    transform: scale(0.997);
}
.todaki-thread--compact .todaki-thread__thumb {
    flex: 0 0 auto;
    width: 84px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f3f5;
}
.todaki-thread--compact .todaki-thread__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.todaki-thread--compact .todaki-thread__compact-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}
.todaki-thread--compact .todaki-thread__meta {
    font-size: 11px;
    color: var(--todaki-text-muted, #8a8a92);
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}
.todaki-thread--compact .todaki-thread__meta .todaki-thread__author {
    color: var(--todaki-text, #1f1f23);
    font-weight: 600;
}
.todaki-thread--compact .todaki-thread__board-meta {
    color: var(--pink, #FF6680);
    font-weight: 700;
    white-space: nowrap;
}
.todaki-thread--compact .todaki-thread__compact-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--todaki-text, #1f1f23);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}
.todaki-thread--compact .todaki-thread__compact-title .todaki-thread__board {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 7px;
    border-radius: 9px;
    background: rgba(255, 102, 128, 0.10);
    color: var(--pink, #FF6680);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
}
.todaki-thread--compact .todaki-thread__compact-excerpt {
    font-size: 12px;
    color: var(--todaki-text-muted, #6a6a73);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}
