/* Collection & Honors pages (lightweight) */

.collection-page,
.honors-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 12px;
}

.collection-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.collection-title,
.honors-title {
  margin: 0;
  font-size: 20px;
}

.collection-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.collection-tab {
  padding: 7px 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.7);
}

.collection-tab.active {
  border-color: rgba(35, 115, 224, 0.6);
  box-shadow: 0 2px 8px rgba(35, 115, 224, 0.12);
  font-weight: 700;
}

.collection-desc,
.honors-desc {
  margin: 10px 0 14px;
  color: rgba(0, 0, 0, 0.65);
  font-size: 13px;
}

.collection-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.collection-visibility {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
}

.collection-visibility-label {
  color: rgba(0, 0, 0, 0.75);
}

.collection-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.collection-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.collection-stat-label {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
}

.collection-stat-value {
  font-size: 14px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 800px) {
  .collection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .collection-visibility {
    margin-left: 0;
  }
}

.collection-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.collection-card.missing {
  opacity: 0.75;
}

.collection-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.collection-card-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

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

.collection-card-name {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-card-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.collection-card-badges {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.collection-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.collection-badge.qty {
  color: rgba(0, 0, 0, 0.7);
}

.collection-star {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  width: 32px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.collection-star.active {
  border-color: rgba(35, 115, 224, 0.5);
}

/* Modal */
.collection-modal[hidden] {
  display: none;
}

.collection-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 12px 24px;
  overflow-y: auto;
}

.collection-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.collection-modal-card {
  position: relative;
  width: min(520px, calc(100vw - 24px));
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.collection-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  width: 34px;
  height: 34px;
  cursor: pointer;
}

.collection-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding-top: 8px;
}

.collection-modal-details {
  width: 100%;
  text-align: center;
}



.collection-modal-image {
  width: min(240px, calc(100vw - 64px));
  aspect-ratio: 3/4;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.collection-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-modal-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.collection-modal-meta {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.65);
  margin-bottom: 10px;
}

.collection-modal-link {
  font-size: 13px;
  text-decoration: none;
}

.collection-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* Honors */
.honors-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.honors-selected-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.honors-selected-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.honors-selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.honor-lists {
  display: grid;
  gap: 16px;
}

.honor-section-title {
  margin: 6px 0 10px;
  font-size: 15px;
}

.honor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 800px) {
  .honor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .honor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.honor-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  text-align: left;
}

.honor-card.locked {
  opacity: 0.6;
}

.honor-card.selected {
  border-color: rgba(35, 115, 224, 0.55);
  box-shadow: 0 3px 16px rgba(35, 115, 224, 0.14);
}

.honor-icon {
  font-size: 26px;
}

.honor-name {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.honor-sub {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.6);
}

.honor-detail {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
}

.honor-detail-title {
  font-weight: 900;
  margin-bottom: 6px;
}

.honor-detail-text {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.7);
}

/* Collection (coming soon / inactive season) */
.collection-coming {
  width: 100%;
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
}

.collection-coming .coming-title {
  font-weight: 900;
  margin-bottom: 4px;
}

.collection-coming .coming-desc {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.7);
}

.collection-page.is-inactive .collection-grid {
  opacity: 0.35;
  pointer-events: none;
}

.collection-page.is-inactive .collection-actions {
  opacity: 0.65;
}

/* ------------------------------------------------------------------
   City card front-end layering (base image + frame overlay)
   - No server-side image rendering
   - Scoped to .collection-page / .collection-modal-image
------------------------------------------------------------------- */

.collection-page .card-top {
  display: flex;
  flex-direction: column;
}

.collection-page .card-image {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.collection-page .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.collection-page .card-image.city-layer {
  position: relative;
}

.collection-page .card-image.city-layer .layer-base,
.collection-page .card-image.city-layer .layer-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.collection-page .card-image.city-layer .layer-base {
  object-fit: cover;
}

.collection-page .card-image.city-layer .layer-frame {
  object-fit: cover;
  pointer-events: none;
}

.collection-page .card-name {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-page .card-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.collection-page .badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.collection-page .badge-qty {
  color: rgba(0, 0, 0, 0.7);
}

.collection-page .badge-star {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  width: 32px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.collection-page .badge-star.on {
  border-color: rgba(35, 115, 224, 0.5);
}

.collection-page .badge-missing {
  opacity: 0.65;
}

/* Modal: allow layered image box inside .collection-modal-image */
.collection-modal-image .modal-card-layer {
  position: relative;
  width: 100%;
  height: 100%;
}

.collection-modal-image .modal-card-layer.city-layer .layer-base,
.collection-modal-image .modal-card-layer.city-layer .layer-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.collection-modal-image .modal-card-layer.city-layer .layer-base {
  object-fit: cover;
}

.collection-modal-image .modal-card-layer.city-layer .layer-frame {
  object-fit: cover;
  pointer-events: none;
}

.collection-modal-image .modal-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}