/**
 * Trip2Where Community Styles — v41.0 Minimal Monochrome
 *
 * Feed mode: compact list with dividers
 * Reader mode: full-screen overlay for immersive reading
 *
 * @package Trip2Where
 * @since 41.0.0
 */

/* ========================================
   CSS Variables (community-specific)
   ======================================== */
.t2w-page-community {
  --gold: #C8956C;
  --gold-light: #f5ebe3;
  --gold-bg: #faf6f1;
  --blue: #2563EB;
  --blue-light: #EFF6FF;
  --green: #059669;
  --green-light: #ECFDF5;
  --red: #EF4444;
  --red-light: #FEF2F2;
  --purple: #7C3AED;
  --purple-light: #F5F3FF;
  --g50: #F9FAFB;
  --g100: #F3F4F6;
  --g200: #E5E7EB;
  --g300: #D1D5DB;
  --g400: #9CA3AF;
  --g500: #6B7280;
  --g700: #374151;
  --g800: #1F2937;
  --g900: #111827;
  --radius: 8px;
  --radius-sm: 6px;
  --pad: 16px;
}

/* ========================================
   Page-level override
   ======================================== */
html body .site-content:has(.t2w-page-community) {
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
}
.t2w-page-community {
  background: #FAFAFA;
}

/* ========================================
   FEED NAV (sticky top)
   ======================================== */
.feed-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #eee;
}
/* Mobile header (search + title + write) */
.feed-nav-top {
  display: flex;
  align-items: center;
  padding: 6px var(--pad);
  gap: 6px;
}
.feed-nav-title {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  text-align: center;
  color: var(--g900);
}
.feed-nav-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--g500);
  cursor: pointer;
}
/* feed-nav-write removed — now uses .feed-nav-icon with pen icon */

/* ========================================
   FEED SEARCH BAR
   ======================================== */
.feed-search {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
  padding: 0 var(--pad);
}
.feed-search.is-open {
  max-height: 38px;
  padding: 2px var(--pad) 6px;
}
.feed-search-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 0 10px;
  background: #fff;
  height: 30px;
}
.feed-search-icon {
  font-size: 11px;
  color: var(--g400);
  flex-shrink: 0;
}
.feed-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 12px;
  color: var(--g900);
  outline: none;
  line-height: 1;
  height: 28px;
  padding: 0;
  margin: 0;
}
.feed-search-input::placeholder {
  color: var(--g400);
  font-size: 12px;
}
.feed-search-clear {
  display: none;
  border: none;
  background: none;
  font-size: 12px;
  color: var(--g400);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.feed-search-clear.is-visible {
  display: block;
}
.feed-nav-icon.is-searching {
  color: var(--gold);
}

/* ========================================
   FEED TABS
   ======================================== */
.feed-tabs {
  display: flex;
  padding: 0 var(--pad);
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.feed-tabs::-webkit-scrollbar {
  display: none;
}
.feed-tab {
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--g400);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feed-tab:hover {
  color: var(--g700);
}
.feed-tab.is-active {
  color: var(--g900);
  font-weight: 600;
  border-bottom-color: var(--gold);
}

/* ========================================
   SUB-FILTER ROW (Q&A / 정보팁)
   ======================================== */
.sub-filter {
  display: none;
  padding: 8px var(--pad);
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-bottom: 1px solid var(--g100);
}
.sub-filter.is-visible {
  display: flex;
}
.sub-filter::-webkit-scrollbar {
  display: none;
}
.sf-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--g100);
  color: var(--g500);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.sf-chip.is-active {
  background: var(--g800);
  color: #fff;
}
.sf-chip--green.is-active {
  background: var(--g800);
  color: #fff;
}
.sf-chip--gold.is-active {
  background: var(--g800);
  color: #fff;
}

/* ========================================
   FEED CONTAINER
   ======================================== */
.feed {
  max-width: 680px;
  margin: 0 auto;
  padding: 6px 0;
}
.feed-panel {
  display: none;
}
.feed-panel.is-active {
  display: block;
}

/* ========================================
   FEED ITEMS — v41.1 Compact List
   ======================================== */
.feed-card {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
  align-items: center;
}
.feed-card:hover {
  background: #f8f8f8;
}
.feed-card:last-child {
  border-bottom: none;
}

/* Body: top-row + title + meta */
.fc-body {
  flex: 1;
  min-width: 0;
}
.fc-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.fc-cat-label {
  font-size: 11px;
  color: var(--g400);
  font-weight: 500;
  letter-spacing: 0.2px;
}
.fc-time {
  font-size: 11px;
  color: var(--g400);
}
.fc-top-dot {
  font-size: 11px;
  color: var(--g400);
}
.fc-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
  word-break: keep-all;
  color: var(--g900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fc-title .fc-hot,
.fc-title .fc-solved {
  display: inline;
  vertical-align: middle;
}
.fc-hot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #EF4444;
  border-radius: 50%;
  flex-shrink: 0;
}
.fc-solved {
  color: #10B981;
  font-size: 14px;
  flex-shrink: 0;
}
.fc-desc {
  display: none;
}
.fc-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--g400);
}
.fc-author {
  color: var(--gold);
  font-weight: 500;
}
.fc-sep {
  margin: 0 1px;
}
.fc-stat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.fc-stat i {
  font-size: 11px;
  opacity: 0.6;
}
.fc-like.liked {
  color: var(--red);
}
.fc-like.liked i {
  opacity: 1;
}

/* No-image card — larger title */
.feed-card.fc-no-img .fc-title {
  font-size: 15px;
}

/* Thumbnail (right side) */
.fc-thumb {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
}
.fc-thumb-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f5ebe3 0%, #ede0d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 22px;
  opacity: 0.6;
}

/* Page header (desktop only) */
.comm-page-header {
  display: none;
}
.comm-page-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0;
}
.comm-page-header p {
  font-size: 14px;
  color: var(--g500);
  margin: 4px 0 0;
}

/* Legacy classes — hidden in v41 */
.fc-head, .fc-av, .fc-cat, .fc-foot,
.fc-qa-row, .fc-qa-icon, .fc-participate,
.fc-answer-preview, .fc-answer-cta, .fc-topic,
.fc-media-row, .fc-place, .fc-place-inline {
  display: none;
}
.fc-card--qa .fc-qa-content {
  flex: 1;
  min-width: 0;
}
.fc-card--qa .fc-qa-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.fc-card--qa .fc-qa-meta .fc-name {
  font-size: 12px;
}
.fc-card--qa .fc-qa-meta .fc-time {
  font-size: 11px;
}

/* Participate CTA */
.fc-participate {
  padding: 0 var(--pad) 8px;
}
.fc-participate-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.fc-participate-cta:hover {
  background: #DBEAFE;
}
.fc-participate-cta--subtle {
  background: var(--g50);
  color: var(--g500);
  font-weight: 600;
  font-size: 12px;
  padding: 8px;
}
.fc-participate-cta--subtle:hover {
  background: var(--g100);
}

/* Q&A footer variants */
.fc-answers-count {
  color: var(--blue);
  font-weight: 600;
}
.fc-waiting {
  color: var(--gold);
  font-weight: 600;
}

/* ========================================
   WRITE FAB (mobile only)
   ======================================== */
.fab {
  display: none;
}
/* Mobile bottom nav */
.comm-bottom-nav {
  display: none;
}
/* Feed write bar — hidden in v41 */
.feed-write-bar {
  display: none;
}

/* ========================================
   WRITE MODAL
   ======================================== */
.write-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.write-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}
.write-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}
.write-modal__sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0.24, 1);
}
.write-modal.is-open .write-modal__sheet {
  transform: translateY(0);
}
.write-modal__header {
  display: flex;
  align-items: center;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--g100);
  gap: 8px;
}
.write-modal__header h3 {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
.write-modal__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--g50);
  color: var(--g600);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.write-modal__submit {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  background: var(--gold);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.write-modal__submit:disabled {
  background: var(--g200);
  color: var(--g400);
  cursor: not-allowed;
}
.write-modal__body {
  padding: 16px var(--pad);
  overflow-y: auto;
  flex: 1;
}
.write-modal__field {
  margin-bottom: 16px;
}
.write-modal__field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--g700);
  margin-bottom: 6px;
}
.write-modal__field .optional {
  color: var(--g400);
  font-weight: 400;
}
.write-modal__field input,
.write-modal__field select,
.write-modal__field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--g200);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.write-modal__field input:focus,
.write-modal__field select:focus,
.write-modal__field textarea:focus {
  border-color: var(--gold);
}
.write-modal__field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
}
/* Photo upload in write modal */
.write-modal__photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.write-modal__photo-add {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  border: 2px dashed var(--g200);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--g400);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.write-modal__photo-add:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.write-modal__photo-add i {
  font-size: 20px;
}
.write-modal__photo-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.write-modal__photo-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
}
.write-modal__photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.write-modal__photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
}

.write-modal__login {
  text-align: center;
  padding: 40px 16px;
  color: var(--g400);
}
.write-modal__login i {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}
.write-modal__login p {
  font-size: 14px;
  margin: 0 0 16px;
}
.write-modal__login-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--gold);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

@media (min-width: 1025px) {
  .write-modal {
    align-items: center;
  }
  .write-modal__sheet {
    border-radius: 16px;
    max-height: 80vh;
    transform: translateY(20px);
  }
  .write-modal.is-open .write-modal__sheet {
    transform: translateY(0);
  }
}

/* ========================================
   READER MODE (fullscreen overlay)
   ======================================== */
.reader {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: #fff;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0.24, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.reader.is-open {
  transform: translateY(0);
}
/* Hide site-wide bottom nav when reader is open */
.reader.is-open ~ .t2w-bottom-nav,
body:has(.reader.is-open) .t2w-bottom-nav {
  display: none !important;
}

/* Reader top bar */
.reader-bar {
  display: flex;
  align-items: center;
  padding: 8px var(--pad);
  gap: 8px;
  border-bottom: 1px solid var(--g100);
  flex-shrink: 0;
  min-height: 48px;
}
.reader-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--g700);
  cursor: pointer;
  transition: background 0.15s;
}
.reader-back:hover {
  background: var(--g50);
}
.reader-bar-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--g500);
  text-align: center;
}
.reader-counter {
  font-size: 12px;
  color: var(--g400);
  font-weight: 600;
  min-width: 36px;
  text-align: right;
}

/* Reader scroll container */
.reader-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ========================================
   READER POST (individual)
   ======================================== */
.rp {
  padding-bottom: 24px;
  border-bottom: 8px solid var(--g100);
}
.rp:last-child {
  border-bottom: none;
}
.rp-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.rp-photo--tall {
  aspect-ratio: 4 / 3;
}
.rp-content {
  padding: 10px var(--pad) 0;
}

/* Category badge */
.rp-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 5px;
  margin-bottom: 8px;
}
.rp-cat--story { background: var(--g100); color: var(--g700); }
.rp-cat--qa { background: var(--green-light); color: var(--green); }
.rp-cat--tip { background: var(--gold-bg); color: var(--gold); }

/* Title + author */
.rp-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
  word-break: keep-all;
}
.rp-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--g100);
}
.rp-author .av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.rp-author .name {
  font-size: 13px;
  font-weight: 600;
}
.rp-author .time {
  font-size: 12px;
  color: var(--g400);
}

/* Body text */
.rp-text {
  font-size: 15px;
  color: var(--g700);
  line-height: 1.8;
  margin-bottom: 16px;
  word-break: keep-all;
}
.rp-text p {
  margin-bottom: 12px;
}
.rp-text strong { font-weight: 700; color: var(--g800); }
.rp-text ul, .rp-text ol { margin: 8px 0 12px 20px; padding: 0; }
.rp-text li { margin-bottom: 4px; line-height: 1.7; }
.rp-text ul li { list-style: disc; }
.rp-text ol li { list-style: decimal; }

/* Place tag */
.rp-place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--g50);
  border: 1px solid var(--g100);
  font-size: 12px;
  font-weight: 600;
  color: var(--g700);
  margin-bottom: 16px;
}
.rp-place img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}
.rp-place i {
  color: var(--gold);
  font-size: 10px;
}

/* Photo grid */
.rp-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.rp-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Stats row */
.rp-stats {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--g100);
  font-size: 13px;
  color: var(--g400);
}
.rp-stats .liked {
  color: var(--red);
}

/* ========================================
   Q&A ANSWER IN READER (with vote)
   ======================================== */
.rp-answers-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--g900);
  margin: 16px 0 12px;
}
.rp-answer {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--g50);
  border-left: 3px solid var(--g200);
  margin-bottom: 12px;
}
.rp-answer--best {
  border-left-color: var(--green);
  background: var(--green-light);
}
.rp-answer--bot {
  border-left-color: var(--purple);
}
.rp-answer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.rp-answer-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
}
.rp-answer-info {
  flex: 1;
  min-width: 0;
}
.rp-answer-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
}
.rp-answer-label--normal {
  color: var(--g500);
}
.rp-answer-label--bot {
  color: var(--purple);
}
.rp-answer-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--g700);
}
.rp-answer-time {
  font-size: 11px;
  color: var(--g400);
}
.rp-answer p {
  font-size: 14px;
  color: var(--g700);
  line-height: 1.7;
  margin: 0;
  word-break: keep-all;
}

/* Vote buttons */
.rp-answer-vote {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 10px;
}
.vote-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--g400);
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: none;
}
.vote-btn:active {
  background: var(--g100);
}
.vote-btn.is-up {
  color: var(--green);
}
.vote-btn.is-down {
  color: var(--red);
}
.vote-btn i {
  font-size: 14px;
}
.vote-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--g700);
  min-width: 20px;
  text-align: center;
}

/* ========================================
   Q&A: Answer input bar (reader bottom)
   ======================================== */
.reader-answer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--g100);
  padding: 8px var(--pad);
  flex-shrink: 0;
  background: #fff;
  min-height: 56px;
}
.answer-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 24px;
  border: 1.5px solid var(--g200);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.answer-input:focus {
  border-color: var(--blue);
}
.answer-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
}

/* ========================================
   TIP: Section markers in reader
   ======================================== */
.rp-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--g900);
  padding: 10px 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rp-section-title i {
  color: var(--gold);
  font-size: 13px;
}
.rp-tip-box {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--gold-bg);
  border: 1px solid var(--gold-light);
  margin-bottom: 16px;
}
.rp-tip-box-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.rp-tip-box p {
  font-size: 13px;
  color: var(--g700);
  line-height: 1.7;
  margin: 0;
}

/* ========================================
   READER POST: Hero + Enhanced Layout (v39.3)
   ======================================== */
.rp-hero {
  position: relative;
  width: 100%;
  max-height: 320px;
  overflow: hidden;
}
.rp-hero__img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.rp-hero__place {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  padding: 5px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.rp-hero__place i {
  color: var(--gold);
  font-size: 11px;
}
.rp-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.rp-dest {
  font-size: 12px;
  color: var(--g500);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rp-dest i {
  font-size: 10px;
  color: var(--gold);
}
.rp-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.rp-av--sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.rp-author-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rp-author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--g800);
}
.rp-author-time {
  font-size: 12px;
  color: var(--g400);
}
.rp-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.rp-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 5px;
  background: var(--g50);
  color: var(--g500);
  font-weight: 500;
}
.rp-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.rp-photo-grid__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.rp-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rp-status--solved {
  background: var(--green-light);
  color: var(--green);
}
.rp-status--waiting {
  background: var(--gold-bg);
  color: var(--gold);
}
.rp-answers {
  border-top: 2px solid var(--g100);
  padding-top: 16px;
  margin-top: 8px;
}
.rp-answers__header {
  font-size: 14px;
  font-weight: 700;
  color: var(--g900);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rp-answers__header i {
  color: var(--blue);
}
.rp-answer__badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.rp-answer__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.rp-answer__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--g700);
}
.rp-answer__time {
  font-size: 12px;
  color: var(--g400);
}
.rp-answer__body {
  font-size: 14px;
  line-height: 1.75;
  color: var(--g700);
  word-break: keep-all;
}
.rp-answer__body p {
  margin: 0 0 8px;
}
.rp-answer__body strong { font-weight: 700; color: var(--g800); }
.rp-answer__body ul, .rp-answer__body ol { margin: 6px 0 10px 18px; padding: 0; }
.rp-answer__body li { margin-bottom: 3px; line-height: 1.65; }
.rp-answer__body ul li { list-style: disc; }
.rp-answer__body ol li { list-style: decimal; }
.rp-no-answers {
  text-align: center;
  padding: 32px 16px;
  color: var(--g400);
}
.rp-no-answers i {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}
.rp-no-answers p {
  font-size: 14px;
  margin: 0;
}
.rp-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60vh;
  color: var(--g400);
}
.rp-empty p {
  font-size: 14px;
}

/* ========================================
   READER: Comments Section (v39.4)
   ======================================== */
.rp-comments {
  border-top: 2px solid var(--g100);
  margin-top: 24px;
  padding: 0 var(--pad) 40px;
}
.rp-comments__header {
  font-size: 14px;
  font-weight: 700;
  color: var(--g900);
  padding: 16px 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rp-comments__header i {
  color: var(--gold);
}
.rp-comments__body {
  min-height: 40px;
}
.rp-comments__empty {
  font-size: 13px;
  color: var(--g400);
  padding: 12px 0;
  text-align: center;
}
.rp-comments__input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 16px;
  border-top: 1px solid var(--g100);
  margin-top: 12px;
}
.rp-comments__field {
  flex: 1;
  padding: 10px 14px;
  border-radius: 24px;
  border: 1.5px solid var(--g200);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.rp-comments__field:focus {
  border-color: var(--gold);
}
.rp-comments__send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.rp-comments__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Backend comment items (from render_comment_item) */
.t2w-comments__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.t2w-comments__item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
}
.t2w-comments__item--reply {
  margin-left: 42px;
  padding: 8px 0;
}
.t2w-comments__avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.t2w-comments__body {
  flex: 1;
  min-width: 0;
}
.t2w-comments__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.t2w-comments__meta strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--g900);
}
.t2w-comments__meta span {
  font-size: 11px;
  color: var(--g400);
}
.t2w-comments__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--g700);
  margin: 0;
  word-break: keep-all;
}
.t2w-comments__actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.t2w-comments__actions button {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--g400);
  cursor: pointer;
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 3px;
}
.t2w-comments__actions button:hover {
  color: var(--g700);
}

/* ========================================
   READER BOTTOM ACTION BAR
   ======================================== */
.reader-actions {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--g100);
  padding: 8px var(--pad);
  gap: 4px;
  flex-shrink: 0;
  background: #fff;
  min-height: 56px;
}
.ra-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--g500);
  border-radius: 8px;
  transition: background 0.15s;
  cursor: pointer;
  border: none;
  background: none;
}
.ra-btn:active {
  background: var(--g50);
}
.ra-btn i {
  font-size: 18px;
}
.ra-btn.is-liked {
  color: var(--red);
}
.ra-cta {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.ra-cta--gold {
  background: var(--gold);
}
.ra-cta--blue {
  background: var(--blue);
}
.ra-cta--save {
  background: var(--gold);
}

/* ========================================
   EMPTY STATE
   ======================================== */
.feed-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--g400);
}
.feed-empty i {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.4;
}
.feed-empty p {
  font-size: 14px;
  margin: 0;
}
.fc-filtered-out,
.fc-search-hidden {
  display: none !important;
}

/* LOADING */
.feed-loading {
  display: flex;
  justify-content: center;
  padding: 40px;
}
.feed-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--g200);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: t2w-spin 0.7s linear infinite;
}
@keyframes t2w-spin {
  to { transform: rotate(360deg); }
}

/* Infinite scroll zone */
.feed-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}
.feed-sentinel {
  height: 1px;
  width: 100%;
}

/* Skeleton cards */
.feed-skeleton {
  width: 100%;
}
.skeleton-card {
  display: flex;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--g100);
}
.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--g100);
  flex-shrink: 0;
  animation: skeletonPulse 1.2s ease-in-out infinite;
}
.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: var(--g100);
  animation: skeletonPulse 1.2s ease-in-out infinite;
}
.skeleton-line--w60 { width: 60%; }
.skeleton-line--w90 { width: 90%; }
.skeleton-line--w80 { width: 80%; }
.skeleton-line--w70 { width: 70%; }
.skeleton-line--w50 { width: 50%; }
.skeleton-line--w40 { width: 40%; }

@keyframes skeletonPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Scroll end state */
.feed-scroll-end {
  padding: 20px 0;
  text-align: center;
  color: var(--g400);
  font-size: 13px;
}
.feed-scroll-end span::before {
  content: '✓ ';
  color: var(--gold);
}

/* ========================================
   SIDEBAR — hidden by default (shown on desktop)
   ======================================== */
.feed-sidebar {
  display: none;
}

/* ========================================
   RESPONSIVE — Tablet (768px+)
   ======================================== */
@media (min-width: 768px) {
  .t2w-page-community {
    --pad: 20px;
  }
  .feed {
    max-width: 700px;
    padding: 4px 0;
  }
  .rp-title {
    font-size: 24px;
  }
  .rp-text {
    font-size: 16px;
  }
}

/* ========================================
   RESPONSIVE — Desktop (1025px+)
   ======================================== */
@media (min-width: 1025px) {
  /* Hide mobile header on desktop */
  .feed-nav-top {
    display: none;
  }
  /* Show page header on desktop */
  .comm-page-header {
    display: block;
    margin-bottom: 20px;
  }
  .comm-page-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
  }
  .comm-desktop-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 0 14px;
    height: 34px;
    min-width: 200px;
    background: #fff;
    margin-top: 8px;
  }
  .comm-desktop-search-icon {
    font-size: 12px;
    color: var(--g400);
  }
  .comm-desktop-search-input {
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--g900);
    outline: none;
    width: 100%;
    height: 32px;
    padding: 0;
    margin: 0;
  }
  .comm-desktop-search-input::placeholder {
    color: var(--g400);
  }

  .feed-nav {
    background: transparent;
    border-bottom: none;
    position: static;
  }
  .feed-tabs {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    gap: 24px;
    border-bottom: 1px solid #eee;
  }
  .sub-filter {
    max-width: 1100px;
    margin: 0 auto;
  }

  .feed-layout {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 36px;
    padding: 24px 20px;
  }
  .feed {
    flex: 1;
    max-width: none;
    padding: 0;
    min-width: 0; /* prevent flex overflow from nowrap text */
  }

  /* Sidebar */
  .feed-sidebar {
    display: block;
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    align-self: flex-start;
  }

  /* Write CTA button */
  .sidebar-cta-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--gold);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: center;
    margin-bottom: 16px;
    transition: opacity 0.2s;
  }
  .sidebar-cta-btn:hover {
    opacity: 0.9;
  }

  /* Sidebar sections */
  .feed-sidebar-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
  }
  .feed-sidebar-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--g900);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  /* Popular list */
  .feed-sidebar-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--g700);
    text-decoration: none;
  }
  .feed-sidebar-item:last-child {
    border-bottom: none;
  }
  .feed-sidebar-item .rank {
    color: var(--gold);
    font-weight: 700;
    font-size: 14px;
    width: 18px;
    flex-shrink: 0;
  }
  .feed-sidebar-item .views {
    margin-left: auto;
    font-size: 11px;
    color: var(--g400);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }

  /* Q&A sidebar */
  .feed-sidebar-item--qa {
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }
  .feed-sidebar-item--qa .qa-q {
    display: none;
  }
  .feed-sidebar-item--qa .qa-title {
    font-size: 13.5px;
    color: var(--g700);
    line-height: 1.4;
  }
  .sidebar-participate-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px;
    margin-top: 10px;
    border-radius: var(--radius);
    border: 1px solid #eee;
    color: var(--g500);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s;
  }
  .sidebar-participate-link:hover {
    border-color: var(--gold);
    color: var(--gold);
  }
  .sidebar-empty-msg {
    font-size: 13px;
    color: var(--g400);
    margin: 0;
  }

  /* Topics */
  .sidebar-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .sidebar-topic-chip {
    padding: 5px 12px;
    border-radius: 16px;
    background: #f0f0f0;
    color: var(--g500);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
  }
  .sidebar-topic-chip:hover {
    background: #e5e5e5;
  }

  /* CTA card */
  .sidebar-cta-card {
    text-align: center;
    background: var(--gold-bg);
    border-color: var(--gold-light);
  }
  .sidebar-cta-card i {
    font-size: 24px;
    color: var(--gold);
    margin-bottom: 8px;
  }
  .sidebar-cta-card p {
    font-size: 13px;
    color: var(--g700);
    line-height: 1.5;
    margin: 0 0 12px;
    word-break: keep-all;
  }

  /* Feed item desktop */
  .fc-title {
    font-size: 16px;
  }
  .fc-thumb {
    width: 72px;
    height: 72px;
  }
}

/* ========================================
   RESPONSIVE — Mobile (<=767px)
   ======================================== */
@media (max-width: 767px) {
  .comm-page-header {
    display: none;
  }
  .feed-nav-top {
    display: flex;
  }
  .feed {
    padding: 0;
  }
  .feed-card {
    padding: 10px var(--pad);
    gap: 12px;
    margin: 0;
    border-radius: 0;
  }
  .feed-card:hover {
    background: transparent;
  }
  .fc-title {
    font-size: 14px;
  }
  .fc-thumb,
  .fc-thumb-placeholder {
    width: 80px;
    height: 80px;
  }
  .fc-meta {
    font-size: 11px;
  }
  .rp-title {
    font-size: 20px;
  }

  /* Mobile bottom nav */
  .comm-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    z-index: 100;
  }
  .comm-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    color: var(--g400);
    padding: 4px 0;
    text-decoration: none;
  }
  .comm-bottom-nav a.active {
    color: var(--g900);
  }
  .comm-bottom-nav a i {
    font-size: 20px;
  }

  /* Ensure feed doesn't go behind bottom nav */
  .feed-more {
    padding-bottom: 70px;
  }
}
