/* AGENT_TARGET: sticker-scrapbook-styles — modal, grid, slot hover for sticker scrapbook */

.sticker-book-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid #e880a0;
  background: linear-gradient(135deg, #fff0f8 0%, #ffe8f4 100%);
  color: #d44080;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin: 4px 4px 0;
  transition:
    background 0.2s,
    transform 0.15s;
}
.sticker-book-btn:hover,
.sticker-book-btn:focus-visible {
  background: linear-gradient(135deg, #ffd6ee 0%, #ffc8e8 100%);
  transform: scale(1.04);
  outline: none;
}
.hud-action-grid .sticker-book-btn {
  display: grid;
  margin: 0;
  padding: 8px 9px;
  border-radius: 12px;
  color: #6b2247;
  font:
    900 13px/1.05 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}
.hud-action-grid .sticker-book-btn:hover,
.hud-action-grid .sticker-book-btn:focus-visible {
  transform: none;
}

/* Modal overlay */
.scrapbook-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scrapbook-modal[hidden] {
  display: none;
}

.scrapbook-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 10, 30, 0.55);
  backdrop-filter: blur(3px);
}

.scrapbook-card {
  position: relative;
  background: linear-gradient(160deg, #fff8f0 0%, #ffeef8 50%, #f8e8ff 100%);
  border: 3px solid #e880a0;
  border-radius: 24px;
  padding: 28px 24px 24px;
  width: min(92vw, 560px);
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(200, 60, 120, 0.3);
  text-align: center;
}

.scrapbook-close {
  position: absolute;
  top: 12px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 64px;
  min-height: 64px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #c06080;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.scrapbook-close:hover {
  color: #d44080;
}

.scrapbook-title-emoji {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 6px;
}
.scrapbook-title {
  margin: 0 0 4px;
  font-size: 1.4rem;
  color: #c03878;
}
.scrapbook-subtitle {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: #9060a0;
}

.scrapbook-count-row {
  margin: 8px 0 16px;
}
.scrapbook-count {
  display: inline-block;
  background: #ffe0f0;
  border: 2px solid #e880a0;
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #c03878;
}

.scrapbook-spotlight {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 2px solid #e3a851;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff9e8 0%, #fff0d0 100%);
  color: #683f16;
  text-align: left;
}
.scrapbook-spotlight-kicker,
.scrapbook-detail-label {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.scrapbook-spotlight-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}
.scrapbook-spotlight-emoji {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  font-size: 1.25rem;
}
.scrapbook-spotlight-text {
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.15;
}
.scrapbook-spotlight-next {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

.scrapbook-detail {
  display: grid;
  gap: 5px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 2px solid #94c67b;
  border-radius: 14px;
  background: #f5ffef;
  color: #31591d;
  text-align: left;
}
.scrapbook-detail.locked {
  border-color: #d3bfd8;
  background: #fbf4ff;
  color: #674476;
}
.scrapbook-detail-name {
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.15;
}
.scrapbook-detail-proof,
.scrapbook-detail-bridge {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.3;
}
.scrapbook-detail-bridge {
  color: #226140;
}
.scrapbook-detail.locked .scrapbook-detail-bridge {
  color: #704d86;
}

/* Sticker grid */
.scrapbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
  justify-items: center;
}

.scrapbook-slot {
  position: relative;
  width: 110px;
  background: #fff0fa;
  border: 2px solid #e8a0c8;
  border-radius: 16px;
  padding: 14px 8px 10px;
  cursor: default;
  color: inherit;
  font: inherit;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
  overflow: visible;
}
.scrapbook-slot.earned {
  background: linear-gradient(135deg, #fff0f8 0%, #ffe0f0 100%);
  border-color: #e060a8;
  box-shadow: 0 2px 10px rgba(220, 80, 160, 0.18);
}
.scrapbook-slot.locked {
  opacity: 0.55;
  filter: grayscale(0.4);
}
.scrapbook-slot.earned:hover,
.scrapbook-slot.earned:focus-visible {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(220, 80, 160, 0.3);
  outline: 3px solid rgba(192, 56, 120, 0.25);
  outline-offset: 3px;
  z-index: 2;
}
.scrapbook-slot:disabled {
  cursor: not-allowed;
}
.scrapbook-slot.locked {
  cursor: pointer;
}

.sticker-emoji {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 6px;
}
.sticker-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #c03878;
  line-height: 1.2;
  min-height: 2.4em;
}
.sticker-evidence {
  color: #7a3a86;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.22;
  margin-top: 6px;
  min-height: 3.6em;
}
.scrapbook-slot.locked .sticker-evidence {
  color: #8a6a90;
}

/* Hover tooltip */
.sticker-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #3a1040;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: normal;
  width: 180px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 20;
}
.sticker-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #3a1040;
}
.scrapbook-slot:hover .sticker-tooltip,
.scrapbook-slot:focus-visible .sticker-tooltip {
  display: block;
}

@media (max-width: 430px) {
  .scrapbook-card {
    padding: 24px 14px 20px;
  }
  .scrapbook-title {
    font-size: 1.18rem;
  }
  .scrapbook-subtitle,
  .scrapbook-count {
    font-size: 0.8rem;
  }
  .scrapbook-spotlight,
  .scrapbook-detail {
    padding: 10px 11px;
  }
  .scrapbook-spotlight-text,
  .scrapbook-detail-name {
    font-size: 0.9rem;
  }
  .scrapbook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .scrapbook-slot {
    width: min(138px, 100%);
    min-height: 150px;
  }
}
