@charset "utf-8";

/* ============================================================
   홍챠피디아 (HongChaPedia) — library.css
   Tea/book community media tracking & rating
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --hcp-bg: #faf8f5;
  --hcp-surface: #ffffff;
  --hcp-surface-hover: #f5f1ec;
  --hcp-border: #e8e2da;
  --hcp-border-light: #f0ebe4;
  --hcp-text: #2c2420;
  --hcp-text-secondary: #7a6e63;
  --hcp-text-muted: #a99e93;
  --hcp-accent: #c0583a;
  --hcp-accent-hover: #a84a2f;
  --hcp-accent-light: #fdf0ec;
  --hcp-star: #e8a838;
  --hcp-star-empty: #d9d2ca;
  --hcp-watched: #c0583a;
  --hcp-interested: #d4894e;
  --hcp-badge-movie: #5a7abf;
  --hcp-badge-tv: #7a5abf;
  --hcp-badge-book: #5abf7a;
  --hcp-badge-anime: #bf5a8a;
  --hcp-badge-manga: #e07040;
  --hcp-badge-music: #c05a9e;
  --hcp-badge-game: #5a9ec0;
  --hcp-badge-boardgame: #8a6d3b;
  --hcp-toast-bg: #2c2420;
  --hcp-toast-text: #faf8f5;
  --hcp-shadow-sm: 0 1px 3px rgba(44, 36, 32, 0.08);
  --hcp-shadow-md: 0 4px 12px rgba(44, 36, 32, 0.1);
  --hcp-shadow-lg: 0 8px 24px rgba(44, 36, 32, 0.12);
  --hcp-radius: 5px;
  --hcp-radius-sm: 3px;
  --hcp-radius-lg: 8px;
  --hcp-max-width: 720px;
  --hcp-transition: 0.2s ease;
}

/* --- Reset / Base --- */
.hcp-wrap {
  max-width: var(--hcp-max-width);
  margin: 0 auto;
  padding: 0 16px 40px;
  min-height: 60vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
  color: var(--hcp-text);
  line-height: 1.6;
}
.hcp-wrap *,
.hcp-wrap *::before,
.hcp-wrap *::after {
  box-sizing: border-box;
}
.hcp-wrap a {
  color: var(--hcp-accent);
  text-decoration: none;
}
.hcp-wrap a:hover {
  color: var(--hcp-accent-hover);
}

/* --- Page Title --- */
.hcp-title {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 24px 0 20px;
}
.hcp-title h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--hcp-text);
  letter-spacing: -0.5px;
}
.hcp-title .hcp-subtitle {
  font-size: 13px;
  color: var(--hcp-text-muted);
}
.hcp-title-icon {
  width: 120px;
  height: auto;
  margin-left: 40px;
  border-radius: 2px;
}
.hcp-my-btn {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 16px;
  border: 1px solid var(--hcp-accent);
  border-radius: var(--hcp-radius);
  color: var(--hcp-accent);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.hcp-wrap .hcp-my-btn:hover {
  background: var(--hcp-accent);
  color: #fff;
}
.hcp-sub-links {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: -12px;
  margin-bottom: 12px;
}
.hcp-sub-link {
  font-size: 11px;
  color: var(--hcp-text-muted);
  text-decoration: none;
}
.hcp-sub-link:hover {
  color: var(--hcp-accent);
  text-decoration: underline;
}

/* --- Category Tabs --- */
.hcp-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
  cursor: grab;
}
.hcp-tabs::-webkit-scrollbar {
  display: none;
}
.hcp-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  border: 1px solid var(--hcp-border);
  border-radius: 20px;
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--hcp-transition);
  user-select: none;
}
.hcp-tab:hover {
  border-color: var(--hcp-accent);
  color: var(--hcp-accent);
  background: var(--hcp-accent-light);
}
.hcp-tab.is-active {
  background: var(--hcp-accent);
  color: #fff;
  border-color: var(--hcp-accent);
}
.hcp-tab small {
  font-size: 12px;
  opacity: 0.7;
  font-weight: 400;
}

/* --- Search Bar --- */
.hcp-search {
  position: relative;
  margin-bottom: 20px;
}
.hcp-search-input {
  width: 100%;
  padding: 10px 14px 10px 40px !important;
  box-sizing: border-box;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  font-size: 15px;
  color: var(--hcp-text);
  outline: none;
  transition: border-color var(--hcp-transition), box-shadow var(--hcp-transition);
}
.hcp-search-input::placeholder {
  color: var(--hcp-text-muted);
}
.hcp-search-input:focus {
  border-color: var(--hcp-accent);
  box-shadow: 0 0 0 3px rgba(192, 88, 58, 0.12);
}
.hcp-search-icon {
  position: absolute;
  left: 12px;
  top: 12px;
  pointer-events: none;
  width: 18px;
  height: 18px;
  color: var(--hcp-text-muted);
  pointer-events: none;
}

.hcp-search-spinner {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--hcp-border-light);
  border-top-color: var(--hcp-accent);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.hcp-search-spinner.is-active {
  opacity: 1;
  animation: hcp-spin 0.6s linear infinite;
}
@keyframes hcp-spin {
  to { transform: rotate(360deg); }
}

/* --- Autocomplete Dropdown --- */
.hcp-autocomplete {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin-top: 4px;
  background: var(--hcp-surface);
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  box-shadow: var(--hcp-shadow-lg);
  max-height: 360px;
  overflow-y: auto;
}
.hcp-autocomplete.is-visible {
  display: block;
}
.hcp-ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--hcp-transition);
}
.hcp-ac-item:hover,
.hcp-ac-item.is-focused {
  background: var(--hcp-surface-hover);
}
.hcp-ac-item + .hcp-ac-item {
  border-top: 1px solid var(--hcp-border-light);
}
.hcp-ac-poster {
  width: 36px;
  height: 52px;
  border-radius: var(--hcp-radius-sm);
  object-fit: cover;
  background: var(--hcp-border-light);
  flex-shrink: 0;
}
.hcp-ac-poster[data-cat="music"],
.hcp-ac-poster[data-cat="boardgame"] { height: 36px; }
.hcp-ac-poster[data-cat="game"] { width: 52px; height: 30px; }
.hcp-ac-info {
  flex: 1;
  min-width: 0;
}
.hcp-ac-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hcp-ac-meta {
  font-size: 12px;
  color: var(--hcp-text-muted);
}
.hcp-ac-title-ko {
  font-size: 12px;
  font-weight: 400;
  color: var(--hcp-text-secondary);
}
.hcp-ac-empty {
  padding: 20px 14px;
  text-align: center;
  color: var(--hcp-text-muted);
  font-size: 14px;
}

/* --- Sort Controls --- */
.hcp-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.hcp-sort {
  display: flex;
  gap: 4px;
}
.hcp-sort-btn {
  padding: 5px 12px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius-sm);
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--hcp-transition);
}
.hcp-sort-btn:hover {
  border-color: var(--hcp-accent);
  color: var(--hcp-accent);
}
.hcp-sort-btn.is-active {
  background: var(--hcp-accent);
  color: #fff;
  border-color: var(--hcp-accent);
}
.hcp-view-count {
  font-size: 13px;
  color: var(--hcp-text-muted);
}

/* --- Feed / Timeline --- */
.hcp-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hcp-wrap a img {
  display: block;
}

/* Feed Card */
.hcp-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--hcp-surface);
  border: 1px solid var(--hcp-border-light);
  border-radius: var(--hcp-radius-lg);
  transition: box-shadow var(--hcp-transition), border-color var(--hcp-transition);
}
.hcp-card:hover {
  box-shadow: var(--hcp-shadow-md);
  border-color: var(--hcp-border);
}

/* Poster thumbnail */
.hcp-card-poster {
  width: auto;
  height: 130px;
  border-radius: var(--hcp-radius);
  object-fit: cover;
  background: var(--hcp-border-light);
  flex-shrink: 0;
}
.hcp-card-poster[data-cat="movie"],
.hcp-card-poster[data-cat="tv"],
.hcp-card-poster[data-cat="book"],
.hcp-card-poster[data-cat="anime"],
.hcp-card-poster[data-cat="manga"] { width: auto; height: 130px; }
.hcp-card-poster.is-landscape { width: 130px; height: 130px; }
.hcp-card-poster-placeholder {
  width: 60px;
  height: 130px;
  border-radius: var(--hcp-radius);
  background: var(--hcp-border-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hcp-text-muted);
  font-size: 11px;
}

/* Card body */
.hcp-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hcp-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.hcp-card-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--hcp-text);
}
.hcp-card-title a {
  color: inherit;
}
.hcp-card-title a:hover {
  color: var(--hcp-accent);
}
.hcp-card-title-ko {
  font-size: 13px;
  font-weight: 400;
  color: var(--hcp-text-secondary);
}

.hcp-card-creator {
  display: block;
  width: 100%;
  font-size: 12px;
  color: var(--hcp-text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hcp-card-creator.hcp-creator-music {
  font-size: 14px;
  font-weight: 700;
  color: var(--hcp-text-secondary);
}

/* Category badge */
.hcp-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.hcp-badge-movie { background: rgba(90,122,191,0.12); color: var(--hcp-badge-movie); }
.hcp-badge-tv    { background: rgba(122,90,191,0.12); color: var(--hcp-badge-tv); }
.hcp-badge-book  { background: rgba(90,191,122,0.12); color: var(--hcp-badge-book); }
.hcp-badge-anime { background: rgba(191,90,138,0.12); color: var(--hcp-badge-anime); }
.hcp-badge-manga { background: rgba(224,112,64,0.12); color: var(--hcp-badge-manga); }
.hcp-badge-music { background: rgba(192,90,158,0.12); color: var(--hcp-badge-music); }
.hcp-badge-game { background: rgba(90,158,192,0.12); color: var(--hcp-badge-game); }
.hcp-badge-boardgame { background: rgba(138,109,59,0.12); color: var(--hcp-badge-boardgame); }

/* Card user area (유저 의견 그룹) */
.hcp-card-user-area {
  background: #f8f5f1;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
}

/* Card meta line */
.hcp-card-meta {
  display: flex;
  align-items: center;
  gap: 0 8px;
  font-size: 13px;
  color: var(--hcp-text-secondary);
  flex-wrap: wrap;
}
.hcp-card-user {
  font-weight: 500;
}

.hcp-review-count {
  font-weight: 600;
  color: var(--hcp-primary);
}

/* Review snippet */
.hcp-card-review {
  font-size: 14px;
  color: var(--hcp-text-secondary);
  line-height: 1.5;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hcp-card-review.hcp-card-comment {
  font-size: 13px;
  color: var(--hcp-text-muted, #888);
}
.hcp-card-review.is-expanded {
  -webkit-line-clamp: unset;
  display: block;
}
.hcp-review-toggle {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--hcp-accent);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.hcp-review-toggle:hover {
  text-decoration: underline;
}

/* Timestamp */
.hcp-card-time {
  font-size: 12px;
  color: var(--hcp-text-muted);
}

/* --- Star Rating --- */
.hcp-stars {
  display: inline-flex;
  align-items: center;
  gap: 0;
  vertical-align: middle;
}
.hcp-star-svg {
  width: 16px;
  height: 16px;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.hcp-star-svg:hover {
  transform: scale(1.15);
}
.hcp-star-svg .star-bg {
  fill: var(--hcp-star-empty);
}
.hcp-star-svg .star-fill {
  fill: var(--hcp-star);
}
.hcp-stars-static .hcp-star-svg {
  cursor: default;
  margin-left: -0.15em;
}
.hcp-stars-static .hcp-star-svg:hover {
  transform: none;
}
.hcp-stars .hcp-score {
  margin-left: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hcp-star);
}
.hcp-stars-lg .hcp-star-svg {
  width: 28px;
  height: 28px;
}
.hcp-stars-lg .hcp-score {
  font-size: 18px;
  margin-left: 8px;
}

/* 작품 상세 인터랙티브 별점 */
.hcp-stars[data-interactive="true"] {
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
}
.hcp-stars[data-interactive="true"] .hcp-star-svg {
  width: 40px;
  height: 40px;
}
.hcp-stars[data-interactive="true"] .hcp-score {
  font-size: 24px;
  margin-left: 12px;
}
.hcp-rating-section {
  text-align: center;
}

/* --- Status Buttons --- */
.hcp-status-btns {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.hcp-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--hcp-transition);
  user-select: none;
}
.hcp-status-btn:hover {
  border-color: var(--hcp-text-secondary);
}
.hcp-status-btn .hcp-status-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.hcp-status-btn.is-active[data-status="watched"] {
  background: var(--hcp-watched);
  border-color: var(--hcp-watched);
  color: #fff;
}
.hcp-status-btn.is-active[data-status="interested"] {
  background: var(--hcp-interested);
  border-color: var(--hcp-interested);
  color: #fff;
}

/* --- Review Textarea --- */
.hcp-review-form {
  margin: 16px 0;
}
.hcp-review-area {
  width: 100%;
  box-sizing: border-box;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  font-size: 14px;
  font-family: inherit;
  color: var(--hcp-text);
  resize: vertical;
  outline: none;
  transition: border-color var(--hcp-transition);
  line-height: 1.6;
}
.hcp-review-area::placeholder {
  color: var(--hcp-text-muted);
}
.hcp-review-area:focus {
  border-color: var(--hcp-accent);
}
.hcp-review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.hcp-char-count {
  font-size: 12px;
  color: var(--hcp-text-muted);
}
.hcp-review-submit {
  padding: 8px 20px;
  border: none;
  border-radius: var(--hcp-radius);
  background: var(--hcp-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--hcp-transition);
}
.hcp-review-submit:hover {
  background: var(--hcp-accent-hover);
}
.hcp-review-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Grid View (Browse) --- */
.hcp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}
.hcp-grid-item {
  position: relative;
  border-radius: var(--hcp-radius);
  overflow: hidden;
  background: var(--hcp-border-light);
  transition: transform var(--hcp-transition), box-shadow var(--hcp-transition);
}
.hcp-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--hcp-shadow-md);
}
.hcp-grid-item a {
  display: block;
  color: inherit;
}
.hcp-grid-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}
.hcp-grid-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
}
.hcp-grid-overlay-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hcp-grid-overlay-score {
  font-size: 12px;
  color: var(--hcp-star);
  margin-top: 2px;
}

/* --- Profile Stats --- */
.hcp-profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin: 20px 0;
}
.hcp-stat-box {
  text-align: center;
  padding: 14px 8px;
  background: var(--hcp-surface);
  border: 1px solid var(--hcp-border-light);
  border-radius: var(--hcp-radius);
}
.hcp-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--hcp-accent);
}
.hcp-stat-label {
  font-size: 12px;
  color: var(--hcp-text-muted);
  margin-top: 2px;
}

/* --- Load More Button --- */
.hcp-load-more {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 16px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--hcp-transition);
  text-align: center;
}
.hcp-load-more:hover {
  background: var(--hcp-surface-hover);
  border-color: var(--hcp-accent);
  color: var(--hcp-accent);
}
.hcp-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Loading Spinner --- */
.hcp-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--hcp-border);
  border-top-color: var(--hcp-accent);
  border-radius: 50%;
  animation: hcpSpin 0.6s linear infinite;
}
.hcp-spinner-center {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}
@keyframes hcpSpin {
  to { transform: rotate(360deg); }
}

/* --- Empty State --- */
.hcp-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--hcp-text-muted);
}
.hcp-empty-icon {
  font-size: 40px;
  margin-bottom: 8px;
  opacity: 0.4;
}
.hcp-empty-msg {
  font-size: 15px;
}
.hcp-empty-sub {
  font-size: 13px;
  margin-top: 4px;
}

/* --- Toast Notification --- */
.hcp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--hcp-toast-bg);
  color: var(--hcp-toast-text);
  padding: 12px 24px;
  border-radius: var(--hcp-radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--hcp-shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.hcp-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- Section Headings --- */
.hcp-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hcp-text);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--hcp-border-light);
}

/* --- Responsive --- */
@media (min-width: 768px) {
  .hcp-wrap {
    padding: 0 24px 60px;
  }
  .hcp-title h2 {
    font-size: 28px;
  }
  .hcp-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
  }
  .hcp-profile-stats {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1024px) {
  .hcp-wrap {
    padding: 0 0 60px;
  }
  .hcp-title h2 {
    font-size: 30px;
  }
  .hcp-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* Small mobile adjustments */
@media (max-width: 400px) {
  .hcp-card {
    padding: 12px;
    gap: 10px;
  }
  .hcp-status-btns {
    flex-direction: column;
  }
  .hcp-status-btn {
    justify-content: center;
  }
  .hcp-tabs {
    gap: 4px;
  }
  .hcp-tab {
    padding: 6px 12px;
    font-size: 13px;
  }
}


/* ============================================================
   작품 상세 페이지 (item.php)
   ============================================================ */

.hcp-container {
  max-width: var(--hcp-max-width);
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.hcp-back-btn {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--hcp-text-secondary);
  text-decoration: none;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
}
.hcp-back-btn:hover {
  color: var(--hcp-primary);
  border-color: var(--hcp-primary);
}

.hcp-item-detail {
  background: var(--hcp-surface);
  border-radius: var(--hcp-radius-lg);
  box-shadow: var(--hcp-shadow-sm);
}

.hcp-item-header {
  display: flex;
  gap: 24px;
  padding: 24px;
}

.hcp-item-poster {
  flex-shrink: 0;
  width: 200px;
  position: relative;
}

.hcp-item-poster img {
  width: 100%;
  border-radius: var(--hcp-radius);
  box-shadow: var(--hcp-shadow-md);
  transition: transform 0.3s ease;
}
.hcp-poster-change-btn {
  display: block;
  margin: 6px auto 0;
  padding: 3px 8px;
  background: transparent;
  border: 1px solid var(--hcp-border-light);
  border-radius: 4px;
  color: var(--hcp-text-muted);
  cursor: pointer;
  font-size: 11px;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.hcp-poster-change-btn:hover {
  opacity: 1;
  border-color: var(--hcp-accent);
  color: var(--hcp-accent);
}
.hcp-poster-change-btn svg {
  vertical-align: middle;
}
.hcp-poster-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--hcp-border-light);
  border-top-color: var(--hcp-accent);
  border-radius: 50%;
  animation: hcp-spin 0.6s linear infinite;
  vertical-align: middle;
  cursor: zoom-in;
  transition: transform 0.25s ease;
  transform-origin: center center;
}
.hcp-item-poster img.is-zoomed {
  transform: scale(2.5);
  transform-origin: 50% 0;
  cursor: zoom-out;
  position: relative;
  z-index: 9999;
}

.hcp-no-poster {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--hcp-border-light);
  border-radius: var(--hcp-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--hcp-text-muted);
}

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

.hcp-category-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.hcp-cat-movie { background: var(--hcp-badge-movie); }
.hcp-cat-tv { background: var(--hcp-badge-tv); }
.hcp-cat-book { background: var(--hcp-badge-book); }
.hcp-cat-anime { background: var(--hcp-badge-anime); }
.hcp-cat-manga { background: var(--hcp-badge-manga); }
.hcp-cat-music { background: #c05a9e; }
.hcp-cat-game { background: #5a9ec0; }
.hcp-cat-boardgame { background: #8a6d3b; }

.hcp-item-title {
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 4px;
  color: var(--hcp-text);
  line-height: 1.3;
}

.hcp-item-original-title {
  font-size: 14px;
  color: var(--hcp-text-muted);
  margin: 0 0 8px;
}
.hcp-item-title-ko {
  font-size: 0.65em;
  font-weight: 400;
  color: var(--hcp-text-secondary);
}
.hcp-title-ko-edit {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.hcp-title-ko-label {
  font-size: 13px;
  color: var(--hcp-text-secondary);
}
.hcp-title-ko-btn {
  background: none;
  border: 1px solid var(--hcp-border-light);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  color: var(--hcp-text-muted);
}
.hcp-title-ko-btn:hover {
  border-color: var(--hcp-accent);
  color: var(--hcp-accent);
}
.hcp-title-ko-form {
  display: flex;
  align-items: center;
  gap: 4px;
}
.hcp-title-ko-input {
  padding: 4px 8px;
  border: 1px solid var(--hcp-border);
  border-radius: 4px;
  font-size: 13px;
  width: 200px;
  background: var(--hcp-bg);
  color: var(--hcp-text);
}
.hcp-title-ko-save,
.hcp-title-ko-del,
.hcp-title-ko-cancel {
  padding: 4px 10px;
  border: 1px solid var(--hcp-border);
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
}
.hcp-title-ko-save:hover {
  background: var(--hcp-accent);
  color: #fff;
  border-color: var(--hcp-accent);
}
.hcp-title-ko-del:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}
.hcp-title-ko-cancel:hover {
  background: var(--hcp-bg);
}

/* 작품 정보 수정 */
.hcp-item-edit-btn {
  background: none;
  border: 1px solid var(--hcp-border-light);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--hcp-text-muted);
  cursor: pointer;
  margin-top: 8px;
}
.hcp-item-edit-btn:hover {
  border-color: var(--hcp-accent);
  color: var(--hcp-accent);
}
.hcp-item-edit-form {
  margin-top: 8px;
  padding: 12px;
  background: var(--hcp-bg);
  border: 1px solid var(--hcp-border-light);
  border-radius: var(--hcp-radius);
}
.hcp-edit-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--hcp-text-muted);
  margin-top: 8px;
  margin-bottom: 2px;
}
.hcp-edit-label:first-child {
  margin-top: 0;
}
.hcp-edit-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--hcp-border);
  border-radius: 4px;
  font-size: 13px;
  background: var(--hcp-surface);
  color: var(--hcp-text);
  box-sizing: border-box;
}
.hcp-edit-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}
.hcp-edit-actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
}
.hcp-edit-save {
  padding: 5px 16px;
  background: var(--hcp-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.hcp-edit-cancel {
  padding: 5px 16px;
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  border: 1px solid var(--hcp-border);
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.hcp-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hcp-meta-item {
  font-size: 14px;
  color: var(--hcp-text-secondary);
}

.hcp-meta-item + .hcp-meta-item::before {
  content: "·";
  margin-right: 8px;
}

/* 보드게임 메타 스타일 */
.hcp-meta-players,
.hcp-meta-playtime {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hcp-meta-players svg,
.hcp-meta-playtime svg {
  opacity: 0.7;
  flex-shrink: 0;
}
.hcp-meta-bgg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
}
.hcp-bgg-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  opacity: 0.7;
}
.hcp-bgg-high {
  background: #e8f5e9;
  color: #2e7d32;
}
.hcp-bgg-mid {
  background: #fff8e1;
  color: #f57f17;
}
.hcp-bgg-low {
  background: #fce4ec;
  color: #c62828;
}

.hcp-item-stats {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hcp-border-light);
}

.hcp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hcp-stat-label {
  font-size: 11px;
  color: var(--hcp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hcp-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--hcp-text);
}

.hcp-stat-count {
  font-size: 12px;
  color: var(--hcp-text-muted);
}

.hcp-star-color {
  color: var(--hcp-star) !important;
}

/* 작품 설명 */
.hcp-item-description {
  padding: 0 24px 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--hcp-text-secondary);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hcp-item-description p {
  margin: 0;
}

.hcp-desc-body.hcp-desc-collapsed {
  max-height: 300px;
  overflow: hidden;
  position: relative;
}

.hcp-desc-body.hcp-desc-collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(transparent, var(--hcp-surface));
}

.hcp-desc-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.hcp-desc-actions .hcp-expand-btn {
  display: block;
  margin: 0 auto;
  padding: 10px 32px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  color: var(--hcp-accent);
  background: var(--hcp-surface-hover);
  border: 1px solid var(--hcp-border-light);
  border-radius: var(--hcp-radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.hcp-desc-actions .hcp-expand-btn:hover {
  background: var(--hcp-border-light);
  border-color: var(--hcp-accent);
}

.hcp-translate-btn {
  font-size: 12px;
  color: var(--hcp-text-muted);
  cursor: pointer;
  border: 1px solid var(--hcp-border-light);
  border-radius: 4px;
  padding: 3px 10px;
  background: transparent;
  transition: color 0.15s, border-color 0.15s;
}

.hcp-translate-btn:hover {
  color: var(--hcp-primary);
  border-color: var(--hcp-primary);
}

.hcp-translate-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* 사용자 액션 영역 */
.hcp-user-actions {
  padding: 20px 24px;
  border-top: 1px solid var(--hcp-border-light);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hcp-status-buttons {
  display: flex;
  gap: 8px;
}

.hcp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--hcp-transition);
}

.hcp-btn:hover {
  background: var(--hcp-surface-hover);
  border-color: var(--hcp-text-muted);
}

.hcp-btn-status.active {
  color: #fff;
  border-color: transparent;
}

.hcp-btn-status.active[data-status="watched"] {
  background: var(--hcp-watched);
}

.hcp-btn-status.active[data-status="interested"] {
  background: var(--hcp-interested);
}

.hcp-btn-primary,
a.hcp-btn-primary {
  background: var(--hcp-accent);
  color: #fff !important;
  border-color: var(--hcp-accent);
  text-decoration: none;
}

.hcp-btn-primary:hover {
  background: var(--hcp-accent-hover);
  border-color: var(--hcp-accent-hover);
}

.hcp-btn-link {
  background: none;
  border: none;
  color: var(--hcp-accent);
  cursor: pointer;
  padding: 4px 0;
  font-size: 13px;
}

/* 평점 (별) */
.hcp-rating-section label,
.hcp-review-section label {
  font-size: 13px;
  font-weight: 600;
  color: var(--hcp-text-secondary);
  margin-bottom: 6px;
  display: block;
}

.hcp-star {
  cursor: pointer;
  display: inline-flex;
}

.hcp-star svg {
  transition: transform 0.15s;
}

.hcp-star:hover svg {
  transform: scale(1.15);
}

.hcp-star-left,
.hcp-star-right {
  fill: var(--hcp-star-empty);
  transition: fill var(--hcp-transition);
}

.hcp-star.filled-left .hcp-star-left,
.hcp-star.filled-full .hcp-star-left,
.hcp-star.filled-full .hcp-star-right {
  fill: var(--hcp-star);
}

.hcp-score-display {
  margin-left: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--hcp-star);
  min-width: 30px;
}

/* 리뷰 */
.hcp-review-input {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  background: var(--hcp-bg);
  color: var(--hcp-text);
  box-sizing: border-box;
}

.hcp-review-input:focus {
  outline: none;
  border-color: var(--hcp-accent);
  box-shadow: 0 0 0 3px var(--hcp-accent-light);
}

.hcp-review-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.hcp-char-count {
  font-size: 12px;
  color: var(--hcp-text-muted);
}

/* 로그인 프롬프트 */
.hcp-login-prompt {
  padding: 20px 24px;
  border-top: 1px solid var(--hcp-border-light);
  text-align: center;
  color: var(--hcp-text-secondary);
  font-size: 14px;
}

.hcp-login-prompt a {
  color: var(--hcp-accent);
  font-weight: 600;
}

/* 리뷰 목록 */
.hcp-reviews-section {
  padding: 20px 24px;
  border-top: 1px solid var(--hcp-border-light);
}

.hcp-reviews-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--hcp-text);
}

.hcp-review-card {
  position: relative;
  padding: 16px 0 16px 52px;
  border-bottom: 1px solid var(--hcp-border-light);
}

.hcp-review-card:last-child {
  border-bottom: none;
}

.hcp-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.hcp-review-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hcp-review-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* pfpic 위치 오버라이드 — 줌 시 reflow 방지를 위해 absolute 사용 */
.hcp-review-card,
.hcp-comment {
  position: relative;
  padding-left: 48px;
}
.hcp-container .pfpic.a2,
.hcp-reviews-section .pfpic.a2,
.hcp-comments-section .pfpic.a2 {
  position: absolute;
  top: 16px;
  left: 0;
  width: 40px !important;
  height: 40px !important;
  flex-shrink: 0;
  cursor: pointer;
  transition: width 0.2s ease, height 0.2s ease !important;
  z-index: 10;
}

.hcp-container .pfpic.a2.zoom,
.hcp-reviews-section .pfpic.a2.zoom,
.hcp-comments-section .pfpic.a2.zoom {
  width: 100px !important;
  height: 100px !important;
  z-index: 999;
}
.hcp-comment .pfpic.a2 {
  top: 10px;
}


.hcp-review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #d3e5f7;
  border: 1px solid var(--hcp-border);
}

.hcp-review-author {
  font-weight: 600;
  color: var(--hcp-text);
  text-decoration: none;
  font-size: 14px;
}

.hcp-review-author:hover {
  color: var(--hcp-accent);
}

.hcp-review-score {
  color: var(--hcp-star);
  font-size: 13px;
  font-weight: 600;
}

.hcp-review-date {
  color: var(--hcp-text-muted);
  font-size: 12px;
}

.hcp-review-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--hcp-text);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hcp-review-body p {
  margin: 0;
}

.hcp-review-body.hcp-truncated {
  max-height: 72px;
  overflow: hidden;
  position: relative;
}

.hcp-review-body.hcp-truncated::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: linear-gradient(transparent, var(--hcp-surface));
}

.hcp-expand-btn {
  font-size: 13px;
}

/* 리뷰 작성 폼 */
.hcp-review-write {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hcp-border-light);
  margin-bottom: 8px;
}

.hcp-review-write .hcp-review-avatar {
  margin-top: 4px;
}

.hcp-review-write-body {
  flex: 1;
  min-width: 0;
}

.hcp-review-delete {
  margin-left: auto;
  color: var(--hcp-accent) !important;
  font-size: 13px !important;
}

/* 댓글 */
.hcp-comments {
  margin-top: 8px;
}

.hcp-comment {
  display: flex;
  gap: 10px;
  padding: 10px 0 10px 48px;
  border-bottom: 1px solid var(--hcp-border-light);
}

.hcp-comment:last-child {
  border-bottom: none;
}

.hcp-comment-body {
  flex: 1;
  min-width: 0;
}

.hcp-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.hcp-comment-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--hcp-text);
}

.hcp-comment-text {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: var(--hcp-text);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hcp-comment-date {
  color: var(--hcp-text-muted);
  font-size: 12px;
}

.hcp-comment-delete {
  color: var(--hcp-accent) !important;
  font-size: 13px !important;
}

.hcp-comment-write {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.hcp-comment-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  font-size: 14px;
  background: var(--hcp-bg);
  color: var(--hcp-text);
  box-sizing: border-box;
}

.hcp-comment-input:focus {
  outline: none;
  border-color: var(--hcp-accent);
}

.hcp-comment-send {
  padding: 6px 12px;
  background: var(--hcp-accent);
  color: #fff;
  border: none;
  border-radius: var(--hcp-radius);
  font-size: 12px;
  cursor: pointer;
}

.hcp-comment-send:hover {
  background: var(--hcp-accent-hover);
}

/* 댓글 섹션 */
.hcp-comments-section {
  padding: 20px 24px;
  border-top: 1px solid var(--hcp-border-light);
}

.hcp-comments-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--hcp-text);
}

.hcp-comment-write-top {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hcp-border-light);
}

.hcp-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

/* 대댓글 들여쓰기 */
.hcp-comment-reply {
  margin-left: 36px;
}

/* 대댓글 입력 */
.hcp-reply-write {
  display: flex;
  gap: 6px;
  margin: 8px 0 4px;
  padding-left: 55px;
}

.hcp-reply-write .hcp-comment-input {
  flex: 1;
}

.hcp-reply-write .hcp-btn {
  flex-shrink: 0;
}

/* 빈 상태 */
.hcp-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--hcp-text-muted);
}

.hcp-empty-state p {
  margin: 0 0 16px;
  font-size: 15px;
}

/* 로딩 */
.hcp-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--hcp-text-muted);
  font-size: 14px;
}


/* ============================================================
   프로필 페이지 (profile.php)
   ============================================================ */

.hcp-profile-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--hcp-text);
  margin: 0 0 20px;
}

.hcp-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.hcp-stat-card {
  background: var(--hcp-surface);
  border-radius: var(--hcp-radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--hcp-shadow-sm);
}

.hcp-stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--hcp-accent);
}

.hcp-stat-card .hcp-stat-label {
  font-size: 12px;
  color: var(--hcp-text-muted);
  margin-top: 4px;
}

.hcp-category-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hcp-cat-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--hcp-text-secondary);
}

/* 필터 */
.hcp-filters {
  margin-bottom: 20px;
}

.hcp-sub-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hcp-filter-btn {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 13px;
  color: var(--hcp-text-secondary);
  text-decoration: none;
  transition: all var(--hcp-transition);
}

.hcp-filter-btn:hover {
  background: var(--hcp-surface-hover);
}

.hcp-filter-btn.active {
  background: var(--hcp-accent);
  color: #fff;
}

.hcp-filter-divider {
  color: var(--hcp-border);
  margin: 0 4px;
}

/* 작품 그리드 */
.hcp-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.hcp-grid-card {
  text-decoration: none;
  color: var(--hcp-text);
  border-radius: var(--hcp-radius);
  overflow: hidden;
  transition: transform var(--hcp-transition), box-shadow var(--hcp-transition);
}

.hcp-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hcp-shadow-md);
}

.hcp-grid-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: var(--hcp-radius);
  background: var(--hcp-border-light);
}

.hcp-grid-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hcp-grid-card[data-cat="music"] .hcp-grid-poster,
.hcp-grid-card[data-cat="boardgame"] .hcp-grid-poster { aspect-ratio: 1/1; }
.hcp-grid-card[data-cat="game"] .hcp-grid-poster { aspect-ratio: 16/9; }

.hcp-grid-poster .hcp-category-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  padding: 2px 6px;
}

.hcp-grid-score {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: var(--hcp-star);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.hcp-grid-info {
  padding: 8px 4px;
}

.hcp-grid-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hcp-grid-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--hcp-text-muted);
}

.hcp-status-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 100px;
  font-weight: 600;
}

.hcp-status-watched { background: var(--hcp-accent-light); color: var(--hcp-watched); }
.hcp-status-interested { background: #fdf5ec; color: var(--hcp-interested); }

/* 페이지네이션 */
.hcp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 0;
}

.hcp-page-btn {
  padding: 6px 16px;
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  border: 1px solid var(--hcp-border);
  color: var(--hcp-text);
  text-decoration: none;
  font-size: 13px;
  transition: all var(--hcp-transition);
}

.hcp-page-btn:hover {
  background: var(--hcp-accent) !important;
  color: #fff !important;
  border-color: var(--hcp-accent) !important;
}

.hcp-page-info {
  font-size: 13px;
  color: var(--hcp-text-muted);
}

/* ============================================================
   반응형 - 작품 상세 & 프로필
   ============================================================ */

@media (max-width: 640px) {
  .hcp-item-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hcp-item-poster {
    width: 160px;
  }
  .hcp-item-stats {
    justify-content: center;
  }
  .hcp-profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .hcp-item-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
  }
  .hcp-status-buttons {
    flex-direction: column;
  }
}

/* --- Reaction System (공통 감정표현) --- */
.reaction-row {
  margin-top: 6px;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.reaction-row-sm {
  margin-top: 4px;
  padding-top: 4px;
  border-top: none;
}
.reaction-btn {
  display: inline-block;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
  vertical-align: middle;
  white-space: nowrap;
  text-decoration: none;
}
.reaction-btn:before {
  content: '\ecf5';
  font-family: 'redtea';
  font-size: 14px;
  margin-right: 4px;
  color: #888;
  vertical-align: middle;
}
.reaction-btn:hover {
  color: var(--hcp-accent);
  text-decoration: none;
}
.reaction-btn:hover:before {
  color: var(--hcp-accent);
}
.reaction-btn.is-on,
.reaction-btn.is-on:before {
  color: #365899;
}
.reaction-row-sm .reaction-btn {
  font-size: 12px;
}
.reaction-row-sm .reaction-btn:before {
  font-size: 13px;
}
.reaction-icons {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.reaction-icons:hover {
  text-decoration: none;
}
.reaction-icons .vNum {
  margin-left: 4px;
  font-size: 12px;
  color: var(--hcp-text-muted);
}
.reaction-icons .vNum:empty {
  display: none;
}
/* 좋아요 목록 팝업 (swal 없는 환경) */
.reaction-list-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.reaction-list-popup {
  background: var(--hcp-surface, #fff);
  border-radius: 12px;
  padding: 20px;
  max-width: 280px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.reaction-list-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
  text-align: center;
}
.reaction-list-close {
  display: block;
  margin: 12px auto 0;
  padding: 6px 20px;
  border: 1px solid var(--hcp-border, #ddd);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

/* --- Review Score Badge --- */
.hcp-review-score {
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}

/* ============================================================
   Bundle Item (묶음 아이템)
   ============================================================ */
.hcp-ac-bundle {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  cursor: default;
}
/* 접힌 상태: 대표 아이템 */
.hcp-ac-bundle-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
}
.hcp-ac-bundle-main:hover {
  background: var(--hcp-bg-hover, #f5f5f5);
}
/* 펼침 버튼 (접힌 상태) */
.hcp-ac-bundle-toggle {
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hcp-accent-light, #e8f0fe);
  border-left: 1px solid var(--hcp-border-light);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
  position: relative;
}
.hcp-ac-bundle-toggle:hover {
  background: var(--hcp-accent, #4a90d9);
  color: #fff;
}
.hcp-ac-bundle-toggle svg {
  width: 16px;
  height: 16px;
}
.hcp-ac-bundle-count {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 10px;
  font-weight: 700;
  background: var(--hcp-accent, #4a90d9);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.hcp-ac-bundle-toggle:hover .hcp-ac-bundle-count {
  background: #fff;
  color: var(--hcp-accent, #4a90d9);
}
/* 펼쳤을 때 대표 아이템+펼침 버튼 숨김 */
.hcp-ac-bundle.is-expanded > .hcp-ac-bundle-main,
.hcp-ac-bundle.is-expanded > .hcp-ac-bundle-toggle {
  display: none;
}
/* 펼쳐진 아이템 영역 */
.hcp-ac-bundle-items {
  display: none;
  width: 100%;
}
.hcp-ac-bundle.is-expanded .hcp-ac-bundle-items {
  display: flex;
}
.hcp-ac-bundle-list {
  flex: 1;
  min-width: 0;
}
.hcp-ac-bundle-subitem {
  padding-left: 26px;
  border-left: 3px solid var(--hcp-accent-light, #e8f0fe);
}
.hcp-ac-bundle-subitem + .hcp-ac-bundle-subitem {
  border-top: 1px dashed var(--hcp-border-light);
}
/* 접기 버튼 (펼쳐진 상태, 우측) */
.hcp-ac-bundle-collapse {
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hcp-accent-light, #e8f0fe);
  border-left: 1px solid var(--hcp-border-light);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
  position: relative;
}
.hcp-ac-bundle-collapse:hover {
  background: var(--hcp-accent, #4a90d9);
  color: #fff;
}
.hcp-ac-bundle-collapse svg {
  width: 16px;
  height: 16px;
}
.hcp-ac-bundle-collapse:hover .hcp-ac-bundle-count {
  background: #fff;
  color: var(--hcp-accent, #4a90d9);
}

/* ============================================================
   Keywords Management Page (묶음 키워드 관리)
   ============================================================ */
.hcp-kw-form {
  background: var(--hcp-surface);
  border: 1px solid var(--hcp-border-light);
  border-radius: var(--hcp-radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}
.hcp-kw-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.hcp-kw-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  font-size: 14px;
  background: var(--hcp-bg);
  color: var(--hcp-text);
  height: 40px;
  box-sizing: border-box;
}
.hcp-kw-input:focus {
  outline: none;
  border-color: var(--hcp-accent);
}
.hcp-kw-select {
  padding: 10px 12px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  font-size: 14px;
  background: var(--hcp-bg);
  color: var(--hcp-text);
  min-width: 140px;
  height: 40px;
  line-height: 1.2;
}
.hcp-kw-btn {
  padding: 8px 20px;
  border: none;
  border-radius: var(--hcp-radius);
  background: var(--hcp-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.hcp-kw-btn:hover {
  opacity: 0.9;
}
.hcp-kw-aliases-row {
  margin-top: 8px;
}
.hcp-kw-aliases-row .hcp-kw-input {
  width: 100%;
}
.hcp-kw-cell-aliases {
  font-size: 13px;
  color: var(--hcp-text-secondary);
  max-width: 250px;
}
.hcp-kw-excludes-badge {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #e74c3c;
}
.hcp-kw-excludes-input::placeholder {
  color: #e74c3c;
  opacity: 0.5;
}
.hcp-kw-form-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--hcp-text-muted);
}
.hcp-kw-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--hcp-surface);
  border: 1px solid var(--hcp-border-light);
  border-radius: var(--hcp-radius-lg);
  overflow: hidden;
}
.hcp-kw-table th {
  background: var(--hcp-bg);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--hcp-border-light);
  color: var(--hcp-text-secondary);
}
.hcp-kw-table td {
  padding: 10px 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--hcp-border-light);
}
.hcp-kw-table tr:last-child td {
  border-bottom: none;
}
.hcp-kw-cell-keyword {
  font-weight: 600;
}
.hcp-kw-cell-actions {
  white-space: nowrap;
  text-align: right;
}
.hcp-kw-btn-sm {
  padding: 4px 10px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
}
.hcp-kw-btn-sm:hover {
  background: var(--hcp-bg);
}
.hcp-kw-btn-del:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}
.hcp-kw-empty {
  text-align: center;
  padding: 40px;
  color: var(--hcp-text-muted);
}
.hcp-kw-loading {
  text-align: center;
  padding: 40px;
  color: var(--hcp-text-muted);
}

@media (max-width: 600px) {
  .hcp-kw-form-row {
    flex-direction: column;
  }
  .hcp-kw-select {
    width: 100%;
  }
  .hcp-kw-table th:nth-child(3),
  .hcp-kw-table td:nth-child(3),
  .hcp-kw-table th:nth-child(4),
  .hcp-kw-table td:nth-child(4) {
    display: none;
  }
}
