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

a,
a:link,
a:visited,
a:hover,
a:active,
a:focus {
  text-decoration: none !important;
}

:root {
  --primary: #1890ff;
  --primary-dark: #1677cc;
  --bg-page: #f5f7fb;
  --bg-white: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #8a97a8;
  --text-muted: #b0b8c5;
  --border: #e6ebf2;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
}

body.detail-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
}

/* Topbar (legacy standalone detail; unused when embedded in app shell) */
.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 50px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s;
}

.back-btn:hover {
  background: var(--bg-page);
}

.detail-topbar .topbar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-spacer {
  width: 80px;
}

/* Main */
.detail-main {
  max-width: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* Hero */
.detail-hero {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 28px;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 63px 28px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.detail-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44.8px;
  background: var(--primary);
}

.detail-poster {
  width: 200px;
  height: 280px;
  border-radius: 8px;
  flex: 0 0 200px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: block;
  font-size: 48px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.detail-poster img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: inherit;
  display: block !important;
  margin: 0 !important;
}

.detail-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.detail-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.detail-enname {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

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

.meta-sep {
  color: var(--border);
  font-size: 12px;
}

.detail-rating {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 16px;
}

.rating-score {
  font-size: 28px;
  font-weight: 700;
  color: #faad14;
}

.rating-label {
  font-size: 13px;
  color: var(--text-muted);
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-primary);
}

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

.action-btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

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

.action-btn.collected {
  border-color: #faad14;
  color: #faad14;
}

/* Sections */
.detail-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.detail-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  padding-left: 12px;
  border-left: 3px solid var(--primary);
  margin-bottom: 16px;
}

/* Synopsis */
.synopsis-section {
  padding: 0 !important;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.synopsis-body {
  padding: 16px;
}

.synopsis-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  text-indent: 2em;
}

.synopsis-meta {
  display: flex;
  gap: 24px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.synopsis-tag {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Resource Links (xgzy 资源链接 1:1, blue theme) */
.playlist-section {
  padding: 0 !important;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.reslink-panel {
  border: 1px solid #bae0ff;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.reslink-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.reslink-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.reslink-title-ico {
  flex-shrink: 0;
  color: #fff;
}

.reslink-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

.reslink-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
}

@media (min-width: 1024px) {
  .reslink-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.reslink-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #bae0ff;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  min-width: 0;
}

.reslink-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(24,144,255,0.06);
  border-bottom: 1px solid #bae0ff;
}

.reslink-card-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.reslink-from {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: #1890ff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.reslink-line-label {
  font-size: 12px;
  color: #6b7280;
}

.reslink-checkall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: #6b7280;
  flex-shrink: 0;
}

.reslink-checkall input,
.reslink-cb {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #1890ff;
  flex-shrink: 0;
  cursor: pointer;
}

.reslink-list {
  flex: 1;
  max-height: 400px;
  overflow-y: auto;
}

.reslink-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(186,224,255,0.45);
  transition: background-color 0.15s;
}

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

.reslink-item:hover {
  background: rgba(24,144,255,0.04);
}

.reslink-play-ico {
  flex-shrink: 0;
  color: #52c41a;
}

.reslink-ep-name {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 500;
  color: #1890ff;
  text-decoration: none !important;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reslink-ep-name:hover {
  text-decoration: underline !important;
}

.reslink-ep-url {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #6b7280;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reslink-report {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  opacity: 1;
  transition: color 0.15s, background-color 0.15s, opacity 0.15s;
}

.reslink-report:hover {
  color: #ff4d4f;
  background: rgba(255,77,79,0.1);
}

@media (min-width: 768px) {
  .reslink-report {
    opacity: 0;
  }
  .reslink-item:hover .reslink-report {
    opacity: 1;
  }
}

.reslink-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid #bae0ff;
  background: rgba(24,144,255,0.04);
}

.reslink-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid #bae0ff;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.reslink-btn:hover {
  background: #e6f4ff;
}

.reslink-btn-primary {
  border-color: #1890ff;
  background: #1890ff;
  color: #fff;
}

.reslink-btn-primary:hover {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}

.reslink-check-ico {
  flex-shrink: 0;
}

/* Celebrities / Photos (xgzy style, blue theme) */
.celeb-section {
  padding: 0 !important;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.celeb-header {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--primary);
  min-height: 44.8px;
}

.celeb-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.celeb-tab:hover {
  color: #fff;
}

.celeb-tab.active {
  color: #fff;
  border-bottom-color: #fff;
}

.celeb-tab-panel {
  padding: 16px;
}

.celeb-tab-panel.is-hidden,
.is-hidden {
  display: none !important;
}

.celeb-status {
  text-align: center;
  padding: 24px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.celeb-wrap,
.photos-wrap {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  padding: 0 28px;
}

.celebrities-swiper,
.photos-swiper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.celeb-nav,
.photos-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.celeb-prev,
.photos-prev { left: 0; }
.celeb-next,
.photos-next { right: 0; }

.celeb-nav:hover,
.photos-nav:hover {
  color: var(--primary);
  border-color: #91caff;
}

.celeb-slide {
  width: auto !important;
}

.celeb-card {
  width: 96px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition: box-shadow 0.15s;
}

.celeb-card:hover {
  box-shadow: 0 4px 12px rgba(24,144,255,0.12);
}

.celeb-avatar-wrap {
  position: relative;
  margin-bottom: 8px;
}

.celeb-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #e6f4ff;
  border: 2px solid #e6ebf2;
}

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

.celeb-badge {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.celeb-badge.is-director {
  color: var(--primary);
  border-color: #91caff;
}

.celeb-badge.is-writer {
  color: #1677ff;
  border-color: #91caff;
}

.celeb-text {
  width: 100%;
  min-width: 0;
}

.celeb-name {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.celeb-aka {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.celeb-role {
  font-size: 10px;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-slide {
  width: auto !important;
}

.media-card {
  width: 256px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: box-shadow 0.15s;
}

.media-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.media-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #f0f2f5;
  overflow: hidden;
}

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

.media-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.28);
  color: #fff;
}

.media-title {
  position: absolute;
  top: 6px;
  left: 6px;
  max-width: 80%;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 12px;
}

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
}

.media-modal-box {
  width: 100%;
  max-width: 860px;
  margin: 0 16px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.media-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.media-modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.media-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.media-modal-close:hover {
  background: #f5f7fb;
  color: var(--text-primary);
}

.media-modal-body {
  padding: 16px;
}

.media-modal-body video,
.media-modal-body img {
  width: 100%;
  display: block;
  border-radius: 8px;
  background: #000;
}

.media-modal-body video {
  aspect-ratio: 16 / 9;
}

/* Related */
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.related-card {
  background: var(--bg-page);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.related-poster {
  width: 100%;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.related-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.related-info {
  padding: 10px 12px;
}

.related-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.related-rating {
  color: #faad14;
}

.related-empty {
  color: var(--text-muted);
  font-size: 13px;
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .reslink-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .media-card {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .detail-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 52px 16px 16px;
    margin-bottom: 16px;
  }

  .detail-hero::before {
    height: 36px;
  }

  .detail-poster {
    width: 140px;
    height: 196px;
    flex: 0 0 140px;
  }

  .detail-name {
    font-size: 20px;
    word-break: break-word;
  }

  .detail-enname {
    font-size: 12px;
  }

  .detail-meta {
    justify-content: center;
    gap: 4px 0;
    font-size: 12px;
  }

  .detail-rating {
    justify-content: center;
  }

  .detail-actions {
    justify-content: center;
    margin-top: 12px;
    width: 100%;
    flex-wrap: wrap;
  }

  .action-btn {
    flex: 1 1 auto;
    min-width: 120px;
    justify-content: center;
  }

  .detail-section {
    padding: 16px;
  }

  .synopsis-section,
  .playlist-section,
  .celeb-section {
    border-radius: var(--radius);
  }

  .synopsis-body {
    padding: 12px;
  }

  .synopsis-text {
    font-size: 13px;
    text-indent: 0;
    line-height: 1.7;
  }

  .synopsis-meta {
    justify-content: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .reslink-header {
    padding: 10px 12px;
    flex-wrap: wrap;
  }

  .reslink-title {
    font-size: 15px;
  }

  .reslink-hint {
    display: none;
  }

  .reslink-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .reslink-item {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 8px;
    padding: 8px 10px;
  }

  .reslink-ep-name {
    max-width: none;
    flex: 1 1 auto;
  }

  .reslink-ep-url {
    flex: 1 1 100%;
    order: 5;
    padding-left: 22px;
    font-size: 11px;
  }

  .reslink-report {
    opacity: 1;
    margin-left: auto;
  }

  .reslink-actions {
    gap: 6px;
  }

  .reslink-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 6px 8px;
  }

  .celeb-header {
    min-height: 42px;
    overflow-x: auto;
  }

  .celeb-tab {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .celeb-tab-panel {
    padding: 12px;
  }

  .celeb-wrap,
  .photos-wrap {
    padding: 0 24px;
  }

  .celeb-card {
    width: 84px;
  }

  .celeb-avatar {
    width: 48px;
    height: 48px;
  }

  .media-card {
    width: 200px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .media-modal-box {
    margin: 0 10px;
    max-width: calc(100vw - 20px);
  }

  .media-modal-body {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .detail-hero {
    padding: 48px 12px 12px;
  }

  .detail-poster {
    width: 120px;
    height: 168px;
    flex: 0 0 120px;
  }

  .detail-name {
    font-size: 18px;
  }

  .meta-sep {
    display: none;
  }

  .meta-item {
    display: inline-block;
    width: 100%;
  }

  .reslink-from {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .reslink-btn {
    width: 100%;
  }

  .celeb-wrap,
  .photos-wrap {
    padding: 0 20px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* MacCMS playlist extras */
.play-source {
  margin-bottom: 16px;
}
.play-source-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.play-source-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.play-source-tools a,
.play-source-tools .ckey {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}
.play-source-tools kbd {
  display: inline-block;
  padding: 4px 10px;
  background: #e6f4ff;
  border-radius: 4px;
  font-size: 12px;
  color: var(--primary);
  border: 1px solid #bae0ff;
}
.episode-item.bug-link {
  background: #fff1f0;
  color: #cf1322;
  border-color: #ffccc7;
}
.playlist-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.playlist-row input[type=checkbox] {
  flex-shrink: 0;
}
.detail-footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--text-muted);
}

/* gbook page within detail-like layout */
.gbook-page .detail-main {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
}
.gbook-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  resize: vertical;
  font-family: inherit;
  outline: none;
}
.gbook-form textarea:focus { border-color: var(--primary); }
.gbook-tip {
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #d46b08;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.gbook-msg-item {
  background: var(--bg-white);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.gbook-msg-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}
.gbook-msg-body { font-size: 14px; line-height: 1.6; }
.gbook-reply {
  margin-top: 12px;
  padding: 12px;
  background: #f0f5ff;
  border-radius: 8px;
  font-size: 13px;
}

/* MacCMS popup (报错/登录等) */
.mac_pop_bg,
.mac_pop_msg_bg {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.45);
}
.mac_pop,
.mac_pop_msg {
  display: none;
  position: fixed;
  z-index: 10001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0;
  min-height: 80px;
  max-height: 85vh;
  max-width: 92vw;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  box-sizing: border-box;
}
.mac_pop .pop_top {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eef2f7;
  box-sizing: border-box;
}
.mac_pop .pop_top h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}
.mac_pop span.pop_close {
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-size: 18px;
  color: #8c8c8c;
  cursor: pointer;
  border-radius: 6px;
  background: none;
  text-indent: 0;
}
.mac_pop span.pop_close:hover {
  background: #f5f7fb;
  color: #1f2937;
}
.mac_pop .pop_content {
  padding: 12px 16px 16px;
  overflow: auto;
  max-height: calc(85vh - 48px);
  box-sizing: border-box;
}
.mac_pop_msg .pop-msg {
  text-align: center;
  font-size: 14px;
  padding: 18px 16px;
  color: #1f2937;
}
.mac_report .gbook_content,
.mac_report textarea {
  width: 100% !important;
  box-sizing: border-box;
  height: 150px;
  padding: 10px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  font-size: 13px;
  resize: vertical;
  outline: none;
  font-family: inherit;
}
.mac_report {
  padding: 4px 2px 8px;
}
.mac_report-label {
  margin-bottom: 8px;
  font-size: 13px;
  color: #1f2937;
}
.mac_report-tools {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  flex-wrap: wrap;
}
.mac_report-verify {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-height: 34px;
}
.mac_report-verify input[name="verify"],
.mac_report-verify .mac_verify,
.mac_report-verify .mac_verify_input {
  width: 88px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e6ebf2;
  border-radius: 6px;
  font-size: 14px;
  line-height: 34px;
  outline: none;
  vertical-align: middle;
  flex: 0 0 auto;
}
.mac_report-verify input:focus {
  border-color: var(--primary);
}
.mac_pop .mac_verify_img,
.mac_report .mac_verify_img,
.mac_report-verify .mac_verify_img {
  display: inline-block !important;
  width: auto !important;
  height: 34px !important;
  max-width: 120px;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle;
  border-radius: 4px;
  cursor: pointer;
  object-fit: contain;
  position: static !important;
  float: none !important;
}
.mac_report-remain {
  color: #8a97a8;
  white-space: nowrap;
}
.mac_report-remain .gbook_remaining {
  color: #cf1322;
  margin-left: 2px;
}
.mac_report-actions {
  text-align: center;
  margin-top: 14px;
}
.mac_report-actions .gbook_submit {
  background: #1890ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 22px;
  cursor: pointer;
  font-size: 14px;
}
.mac_report-actions .gbook_submit:hover {
  background: #1677cc;
}
