#story_rewards-panel .panel-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top center, rgba(255, 224, 244, 0.72), rgba(255, 224, 244, 0) 38%),
    linear-gradient(180deg, rgba(255, 249, 253, 0.98) 0%, rgba(243, 233, 247, 0.98) 100%);
}

#story_rewards-title {
  display: block;
}

#story_rewards-summary {
  display: flex;
  gap: 10px;
  padding: 12px 16px 10px;
  background:
    linear-gradient(180deg, rgba(255, 248, 253, 0.94), rgba(248, 239, 250, 0.90));
  border-bottom: 1px solid var(--dg-border-muted);
}

#story_rewards-summary span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(188, 150, 194, 0.34);
  background: rgba(255, 255, 255, 0.62);
  color: var(--dg-text-body);
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

#story_rewards-profile {
  display: none;
  padding: 0 16px 14px;
  background:
    linear-gradient(180deg, rgba(251, 241, 248, 0.88), rgba(245, 235, 247, 0.84));
}

.story-rewards-profile-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(199, 155, 194, 0.28);
  background:
    radial-gradient(circle at top right, rgba(255, 214, 242, 0.42), rgba(255, 214, 242, 0) 34%),
    linear-gradient(135deg, rgba(118, 34, 84, 0.94), rgba(56, 18, 49, 0.94));
  box-shadow:
    0 18px 34px rgba(79, 22, 60, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.story-rewards-profile-halo {
  position: absolute;
  inset: auto -40px -70px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 210, 235, 0.46), rgba(255, 210, 235, 0) 68%);
  pointer-events: none;
}

.story-rewards-profile-avatar {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  border-radius: 22px;
  object-fit: cover;
  object-position: top;
  border: 1px solid rgba(255, 231, 196, 0.56);
  background: rgba(255, 243, 248, 0.12);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.story-rewards-profile-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.story-rewards-profile-overline {
  color: rgba(255, 234, 214, 0.78);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.story-rewards-profile-name {
  color: #fff4ea;
  font-size: 22px;
  line-height: 1.04;
  font-weight: 700;
}

.story-rewards-profile-relationship {
  color: rgba(255, 238, 225, 0.86);
  font-size: 13px;
  line-height: 1.35;
}

.story-rewards-profile-id {
  color: rgba(255, 220, 194, 0.72);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#story_rewards-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px 16px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 72px;
  grid-auto-flow: dense;
  gap: 14px;
  align-content: start;
}

.story-reward-empty,
.story-reward-load-more {
  grid-column: 1 / -1;
  padding: 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(198, 164, 200, 0.24);
  background: rgba(255, 255, 255, 0.62);
  color: var(--dg-text-muted);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.story-reward-load-more {
  font-size: 12px;
}

.story-reward-card {
  --reward-accent: rgba(255, 183, 211, 0.85);
  --reward-accent-soft: rgba(255, 183, 211, 0.22);
  --reward-shade-top: rgba(61, 17, 46, 0.18);
  --reward-shade-bottom: rgba(30, 10, 25, 0.92);
  position: relative;
  min-height: 0;
  grid-row: span 3;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 226, 240, 0.22);
  background:
    radial-gradient(circle at top left, rgba(255, 226, 240, 0.18), rgba(255, 226, 240, 0) 34%),
    linear-gradient(180deg, var(--dg-card-dark), var(--dg-card-dark-deep));
  box-shadow:
    0 18px 32px rgba(71, 25, 58, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: pointer;
  isolation: isolate;
}

.story-reward-card--compact {
  grid-row: span 2;
}

.story-reward-card--standard {
  grid-row: span 3;
}

.story-reward-card--feature {
  grid-row: span 4;
}

.story-reward-card--tone-rose {
  --reward-accent: rgba(255, 196, 225, 0.92);
  --reward-accent-soft: rgba(255, 170, 214, 0.24);
}

.story-reward-card--tone-gold {
  --reward-accent: rgba(255, 222, 165, 0.92);
  --reward-accent-soft: rgba(255, 214, 152, 0.24);
}

.story-reward-card--tone-amber {
  --reward-accent: rgba(255, 198, 157, 0.92);
  --reward-accent-soft: rgba(255, 189, 141, 0.24);
}

.story-reward-card--tone-plum {
  --reward-accent: rgba(221, 186, 255, 0.92);
  --reward-accent-soft: rgba(213, 173, 255, 0.24);
}

.story-reward-card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.05) brightness(0.74);
  transform: scale(1.03);
}

.story-reward-card-shade,
.story-reward-card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.story-reward-card-shade {
  background:
    linear-gradient(180deg, var(--reward-shade-top) 0%, rgba(41, 14, 31, 0.54) 38%, var(--reward-shade-bottom) 100%),
    radial-gradient(circle at 84% 14%, var(--reward-accent-soft), rgba(255, 255, 255, 0) 30%);
}

.story-reward-card-glow {
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 20%),
    radial-gradient(circle at 70% 84%, var(--reward-accent-soft), rgba(255, 255, 255, 0) 28%);
  mix-blend-mode: screen;
}

.story-reward-card.unclaimed {
  box-shadow:
    0 0 0 1px rgba(255, 222, 175, 0.22),
    0 18px 34px rgba(89, 27, 67, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.story-reward-card--locked .story-reward-card-media {
  filter: saturate(0.82) brightness(0.48) blur(1px);
}

.story-reward-card--locked .story-reward-card-shade {
  background:
    linear-gradient(180deg, rgba(41, 18, 34, 0.42), rgba(23, 10, 20, 0.96)),
    radial-gradient(circle at 84% 14%, rgba(255, 222, 175, 0.12), rgba(255, 255, 255, 0) 30%);
}

.story-reward-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px;
  gap: 8px;
}

.story-reward-card-copy {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.story-reward-card-top,
.story-reward-card-bottom,
.story-reward-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.story-reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 241, 224, 0.16);
  background: rgba(39, 15, 35, 0.44);
  color: var(--reward-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.story-reward-chip-icon {
  font-size: 13px;
  line-height: 1;
}

.story-reward-badge-new,
.story-reward-badge-lock {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.story-reward-badge-new {
  background: linear-gradient(135deg, rgba(255, 174, 216, 0.98), rgba(255, 111, 179, 0.98));
  color: var(--dg-text-on-dark);
  box-shadow: 0 8px 18px rgba(168, 40, 108, 0.22);
}

.story-reward-badge-lock {
  background: rgba(31, 14, 27, 0.54);
  border: 1px solid rgba(255, 235, 207, 0.18);
  color: rgba(255, 233, 205, 0.82);
}

.story-reward-time,
.story-reward-open-hint,
.story-reward-preview-time {
  color: rgba(255, 235, 214, 0.72);
  font-size: 11px;
  line-height: 1.3;
}

.story-reward-text,
.story-reward-preview-text {
  color: #fff7ef;
  text-shadow: 0 2px 16px rgba(18, 8, 14, 0.26);
}

.story-reward-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 3;
  font-size: 15px;
  line-height: 1.34;
  font-weight: 500;
}

.story-reward-card--compact .story-reward-text {
  font-size: 13px;
  line-height: 1.28;
  -webkit-line-clamp: 3;
}

.story-reward-card--feature .story-reward-text {
  font-size: 17px;
  line-height: 1.32;
  -webkit-line-clamp: 6;
}

.story-reward-text.story-reward-text-italic,
.story-reward-preview-text.story-reward-preview-text-italic {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-style: italic;
  color: #fff1e5;
}

.story-reward-card--feature .story-reward-text.story-reward-text-italic {
  font-size: 20px;
  line-height: 1.22;
}

.story-reward-signature,
.story-reward-preview-signature {
  color: rgba(255, 232, 210, 0.90);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 16px;
  text-align: right;
}

.story-reward-card--compact .story-reward-signature {
  display: none;
}

.story-reward-card-bottom {
  margin-top: 6px;
}

#story_rewards-footer {
  justify-content: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--dg-border-muted);
  background: rgba(255, 248, 252, 0.68);
  backdrop-filter: blur(10px);
}

.story-reward-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(20, 10, 19, 0.72);
  backdrop-filter: blur(12px);
}

.story-reward-preview {
  position: relative;
  width: min(100%, 540px);
  max-height: 100%;
  overflow-y: auto;
  padding: 18px;
  border-radius: 30px;
  border: 1px solid rgba(255, 230, 242, 0.18);
  background:
    radial-gradient(circle at top right, rgba(255, 210, 235, 0.18), rgba(255, 210, 235, 0) 34%),
    linear-gradient(180deg, rgba(92, 35, 74, 0.98), rgba(31, 13, 28, 0.98));
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.story-reward-preview--locked {
  background:
    radial-gradient(circle at top right, rgba(255, 222, 175, 0.10), rgba(255, 222, 175, 0) 34%),
    linear-gradient(180deg, rgba(58, 31, 45, 0.98), rgba(23, 12, 21, 0.98));
}

.story-reward-preview-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 239, 223, 0.18);
  border-radius: 999px;
  background: rgba(26, 10, 21, 0.54);
  color: #fff4eb;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.story-reward-preview-head {
  padding-right: 42px;
  margin-bottom: 14px;
}

.story-reward-preview-img,
.story-reward-preview-video {
  width: 100%;
  border-radius: 22px;
  margin-bottom: 14px;
  box-shadow: 0 16px 30px rgba(12, 6, 11, 0.24);
}

.story-reward-preview-img {
  max-height: 420px;
  object-fit: cover;
  object-position: top;
}

.story-reward-preview-video {
  background: rgba(0, 0, 0, 0.28);
}

.story-reward-preview-audio {
  width: 100%;
  margin-bottom: 14px;
}

.story-reward-preview-text {
  font-size: 18px;
  line-height: 1.5;
}

.story-reward-preview-text.story-reward-preview-text-italic {
  font-size: 21px;
  line-height: 1.36;
}

.story-reward-preview-signature {
  margin-top: 12px;
}

@media (max-width: 640px) {
  #story_rewards-summary {
    padding: 10px 12px 8px;
  }

  #story_rewards-profile {
    padding: 0 12px 12px;
  }

  .story-rewards-profile-card {
    padding: 14px;
    border-radius: 22px;
  }

  .story-rewards-profile-avatar {
    width: 74px;
    height: 74px;
    border-radius: 20px;
  }

  .story-rewards-profile-name {
    font-size: 20px;
  }

  #story_rewards-list {
    padding: 4px 12px 16px;
    gap: 12px;
    grid-auto-rows: 64px;
  }

  .story-reward-card-content {
    padding: 12px;
  }

  .story-reward-card--feature .story-reward-text.story-reward-text-italic {
    font-size: 17px;
  }

  .story-reward-preview {
    padding: 16px;
    border-radius: 24px;
  }

  .story-reward-preview-text.story-reward-preview-text-italic {
    font-size: 19px;
  }
}

@media (max-width: 380px) {
  #story_rewards-list {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .story-reward-card,
  .story-reward-card--compact,
  .story-reward-card--standard,
  .story-reward-card--feature {
    grid-row: span 1;
    min-height: 182px;
  }
}
