.rbv-wrap,
.rbv-wrap * {
  box-sizing: border-box;
}
.rbv-wrap {
  font-family: Poppins, Inter, Arial, sans-serif;
  width: min(calc(100% - 48px), 1285px);
  max-width: 1285px;
  margin: 0 auto;
  padding: 0 0 70px;
  color: #2f3433;
}

/* Topbar */
.rbv-topbar {
  background: #fff;
  border-radius: 11px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.08),
    0 6px 16px rgba(0, 0, 0, 0.04);
}
.rbv-topbar-left h2 {
  font-size: 20px;
  font-weight: 800;
  color: #092b1e;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.rbv-count {
  font-size: 11px;
  color: #8a8f8c;
  display: flex;
  align-items: center;
  gap: 5px;
}
.rbv-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f5f5;
  border-radius: 999px;
  padding: 0 14px;
  height: 34px;
  width: 220px;
  border: 1px solid #e8e8e8;
}
.rbv-search span {
  font-size: 18px;
  color: #aaa;
  line-height: 1;
}
.rbv-search input {
  border: 0 !important;
  background: transparent !important;
  outline: 0 !important;
  font-size: 11px !important;
  color: #555;
  width: 100%;
  box-shadow: none !important;
  padding: 0 !important;
  min-height: 0 !important;
}
.rbv-search input::placeholder {
  color: #bbb;
}

/* Nav tabs */
.rbv-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #e8e8e8;
  background: transparent;
}
.rbv-tab {
  border: 0 !important;
  background: transparent !important;
  font-size: 11px;
  font-weight: 600;
  color: #aaa;
  cursor: pointer;
  padding: 0 2px 12px;
  border-bottom: 2.5px solid transparent !important;
  transition: 0.15s;
  outline: 0;
}
.rbv-tab:hover {
  color: #092b1e;
}
.rbv-tab.active {
  color: #092b1e !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  border-bottom-color: #0d7d43 !important;
}

/* Sections */
.rbv-section {
  position: relative;
  margin-bottom: 28px;
}
.rbv-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.rbv-section-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #092b1e;
}
.rbv-section-head button {
  border: 0 !important;
  background: transparent !important;
  color: #0d7d43;
  font-weight: 700;
  cursor: pointer;
  font-size: 9px;
  padding: 0 !important;
}

/* Grid */
.rbv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* Card */
.rbv-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 11px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  height: 415px;
  min-height: 415px;
  max-height: 415px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.15s;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.03);
}
.rbv-card:hover {
  border-color: #c5c5c5;
  transform: translateY(-1px);
}

.rbv-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex: 0 0 auto;
}
.rbv-card-head h4 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: #111;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.rbv-star {
  font-size: 9px;
  color: #9d7400;
  white-space: nowrap;
  flex: 0 0 auto;
}

.rbv-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #9a9a9a;
  font-size: 9px;
  margin-bottom: 10px;
  flex: 0 0 auto;
}

.rbv-card p {
  color: #666;
  font-size: 10px;
  line-height: 1.5;
  margin: 0 0 10px;
  flex: 0 0 58px;
  min-height: 58px;
  max-height: 58px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.rbv-thumb {
  width: 100%;
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  flex: 0 0 180px;
  background: #f2f2f2;
}
.rbv-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 11px;
  font-weight: 600;
  border: 1px dashed #ddd;
}

.rbv-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  flex: 0 0 auto;
  padding-top: 8px;
}
.rbv-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 68%;
  font-size: 9px;
  color: #0d7d43;
}
.rbv-tags span:not(.rbv-tag-icon) {
  background: #e2f5eb;
  color: #0d7d43;
  border-radius: 999px;
  padding: 3px 7px;
}
.rbv-tag-icon {
  font-size: 8px;
}
.rbv-card-foot button {
  border: 0 !important;
  background: transparent !important;
  color: #0d7d43;
  font-weight: 700;
  cursor: pointer;
  font-size: 9px;
  padding: 0 !important;
  white-space: nowrap;
}

/* Empty state */
.rbv-empty {
  display: none;
  background: #fff;
  border: 1px dashed #ddd;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  color: #aaa;
  font-size: 12px;
}
.rbv-section.is-empty .rbv-empty {
  display: block;
}

/* Show more */
.rbv-collapsed .rbv-grid .rbv-card:nth-child(n + 7) {
  display: none;
}
.rbv-cloud {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  background: linear-gradient(180deg, rgba(243, 243, 243, 0), rgba(243, 243, 243, 0.92) 48%, #f3f3f3 100%);
  pointer-events: none;
  z-index: 2;
}
.rbv-collapsed.has-more .rbv-cloud {
  display: block;
}
.rbv-center {
  text-align: center;
  position: relative;
  z-index: 5;
  margin: 24px 0 60px;
}
.rbv-show-more {
  border: 0 !important;
  background: #fff;
  color: #0d7d43;
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 22px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-size: 12px;
}

/* Viewer modal */
.rbv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  padding: 18px;
}
.rbv-overlay.open {
  display: flex;
}
.rbv-viewer {
  background: #fff;
  border-radius: 16px;
  width: min(1180px, 96vw);
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}
.rbv-back {
  border: 0;
  background: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 700;
}
.rbv-view-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 40px;
}
.rbv-view-main {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 8px;
  background: #f2f2f2;
  display: block;
}
.rbv-view-thumbs {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin-top: 10px;
}
.rbv-view-thumbs img {
  width: 110px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
}
.rbv-view-thumbs img.active {
  border-color: #0d7d43;
}
.rbv-viewer h2 {
  font-size: 22px;
  margin: 0 0 8px;
  color: #092b1e;
}
.rbv-view-body {
  font-size: 15px;
  line-height: 1.75;
  color: #777;
  margin: 16px 0;
  white-space: pre-wrap;
}
.rbv-share {
  border: 0;
  background: transparent;
  color: #0d7d43;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 900px) {
  .rbv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .rbv-wrap {
    width: calc(100% - 28px);
  }
  .rbv-grid {
    grid-template-columns: 1fr;
  }
  .rbv-topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .rbv-search {
    width: 100%;
  }
  .rbv-view-grid {
    grid-template-columns: 1fr;
  }
  .rbv-view-main {
    height: 260px;
  }
}

/* v1.1.0 public viewer refresh */
.rbv-wrap {
  width: min(calc(100% - 40px), 1320px);
  max-width: 1320px;
  padding: 28px 0 80px;
  color: #26332c;
}

.rbv-topbar {
  padding: 22px 24px;
  margin-bottom: 18px;
  border: 1px solid #dfe8e2;
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 0, rgba(137, 205, 162, .22), transparent 30%),
    #fff;
  box-shadow: 0 12px 32px rgba(16, 39, 28, .08);
}

.rbv-topbar-left h2 {
  color: #10271c;
  font-size: clamp(21px, 2.6vw, 28px);
  letter-spacing: -.035em;
}

.rbv-count {
  color: #718078;
  font-size: 12px;
}

.rbv-search {
  width: 280px;
  height: 44px;
  padding: 0 15px;
  border-color: #dfe8e2;
  border-radius: 14px;
  background: #f8faf9;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.rbv-search:focus-within {
  border-color: #7db89a;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(25, 122, 75, .10);
}

.rbv-search input {
  font-size: 12px !important;
}

.rbv-nav {
  gap: 8px;
  padding: 0;
  margin-bottom: 28px;
  border: 0;
}

.rbv-tab,
.rbv-tab.active {
  min-height: 40px;
  padding: 0 16px;
  border: 0 !important;
  border-radius: 12px;
  color: #647169;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.rbv-tab:hover {
  background: #edf6f0 !important;
  color: #0e4f31;
}

.rbv-tab.active {
  background: #0e4f31 !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(14, 79, 49, .18);
}

.rbv-section {
  margin-bottom: 34px;
}

.rbv-section-head {
  margin-bottom: 15px;
}

.rbv-section-head h3 {
  color: #10271c;
  font-size: 17px;
  letter-spacing: -.02em;
}

.rbv-grid {
  gap: 20px;
}

.rbv-card {
  position: relative;
  height: 450px;
  min-height: 450px;
  max-height: 450px;
  padding: 12px 14px 14px;
  border-color: #dfe8e2;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(16, 39, 28, .07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.rbv-card:hover {
  transform: translateY(-4px);
  border-color: #bdd7c7;
  box-shadow: 0 18px 38px rgba(16, 39, 28, .12);
}

.rbv-thumb {
  order: -1;
  height: 202px;
  min-height: 202px;
  max-height: 202px;
  flex-basis: 202px;
  margin-bottom: 15px;
  border-radius: 14px;
}

.rbv-thumb-empty {
  border-color: #cddbd2;
  background: linear-gradient(135deg, #f4f8f5, #eaf2ed);
  color: #8a9a91;
}

.rbv-card-head {
  margin-bottom: 7px;
}

.rbv-card-head h4 {
  color: #10271c;
  font-size: 14px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
}

.rbv-star {
  padding: 4px 7px;
  border: 1px solid #ead69a;
  border-radius: 999px;
  background: #fff8df;
  color: #906a00;
  font-size: 8px;
  font-weight: 800;
}

.rbv-meta {
  color: #829087;
  font-size: 10px;
}

.rbv-card p {
  flex-basis: 43px;
  min-height: 43px;
  max-height: 43px;
  color: #68766e;
  font-size: 11px;
  -webkit-line-clamp: 2;
}

.rbv-card-foot {
  min-height: 36px;
  padding-top: 9px;
  border-top: 1px solid #edf1ee;
}

.rbv-tags span:not(.rbv-tag-icon) {
  padding: 4px 8px;
  background: #edf7f1;
  color: #26774e;
}

.rbv-card-foot button {
  min-height: 30px;
  padding: 0 8px !important;
  border-radius: 8px !important;
  font-size: 10px;
}

.rbv-card-foot button:hover {
  background: #eaf6ef !important;
}

.rbv-empty {
  padding: 42px 24px;
  border-color: #bdd3c5;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, #f4f9f6);
}

.rbv-show-more {
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid #dbe7df !important;
  box-shadow: 0 8px 20px rgba(16, 39, 28, .10);
}

.rbv-overlay {
  background: rgba(6, 24, 15, .66);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.rbv-viewer {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .30);
}

.rbv-view-main {
  border-radius: 16px;
}

.rbv-viewer h2 {
  color: #10271c;
  font-size: 26px;
  letter-spacing: -.03em;
}

.rbv-view-body {
  color: #647169;
}

@media (max-width: 700px) {
  .rbv-wrap {
    width: calc(100% - 20px);
    padding-top: 12px;
  }

  .rbv-topbar {
    padding: 18px;
    border-radius: 17px;
  }

  .rbv-search {
    width: 100%;
  }

  .rbv-nav {
    overflow-x: auto;
  }

  .rbv-tab {
    flex: 0 0 auto;
  }

  .rbv-grid {
    gap: 14px;
  }

  .rbv-card {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .rbv-thumb {
    height: clamp(190px, 58vw, 260px);
    min-height: clamp(190px, 58vw, 260px);
    max-height: clamp(190px, 58vw, 260px);
    flex-basis: clamp(190px, 58vw, 260px);
  }

  .rbv-viewer {
    width: 100%;
    max-height: 94vh;
    padding: 18px;
    border-radius: 18px;
  }
}