/* reward-dialogs.css — Keno Quest toy-adventure finish for Missions/Streak,
   Daily Rewards and illustrated store plaques. Paint/layout only. */
.rd-art { display: block; object-fit: contain; pointer-events: none; }
.rd-art[hidden], .rd-plaque-art[hidden] { display: none; }
.rd-h { display: flex; align-items: center; gap: 8px; }
.rd-art-h { width: 40px; height: 40px; flex: none; }

.daily-systems-head, .dc-head { display: flex; align-items: center; gap: 10px; }
.daily-systems-head > div, .dc-head > div { flex: 1; min-width: 0; }
.rd-art-head { width: 72px; height: 72px; flex: none; margin: -10px 0 -14px -4px; }

/* Reserve feedback space and scroll instead of clipping */
/* Scroll owner: the native <dialog> element itself scrolls (overflow:auto,
   fixed-size and viewport-bounded in adventure-dialogs.css). Headers stay pinned;
   receipts/errors remain in flow and reachable. */
:is(.daily-systems-dialog, .dc-dialog) { max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow: auto; overscroll-behavior: contain; }
.daily-systems-receipt, .daily-systems-alert, .dc-receipt, .dc-alert { overflow-wrap: anywhere; }

/* Store plaques */
.rd-plaque { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 0 0 12px; border-radius: 20px; min-width: 0; }
.rd-plaque-art { width: 88px; height: 88px; flex: none; object-fit: contain; }
.rd-plaque-copy { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.rd-plaque-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.rd-plaque-title { font-size: 1.25rem; line-height: 1.1; }
.rd-plaque-text { font-size: .9rem; line-height: 1.3; }
.rd-empty-card .cv-empty { margin-top: 0; }

@media (max-width: 420px) {
  .rd-art-head { width: 52px; height: 52px; margin: -6px 0 -8px -2px; }
  .rd-plaque { flex-direction: column; text-align: center; }
  .rd-plaque-art { width: 72px; height: 72px; }
}
@media (max-height: 560px) { .rd-art-head { width: 44px; height: 44px; margin: 0; } .rd-plaque-art { width: 56px; height: 56px; } }

@media (forced-colors: none) {
  html body[data-theme="adventure"][data-theme][data-theme] .rd-art-head { filter: drop-shadow(0 3px 0 #3d200baa); }
  html body[data-theme="adventure"][data-theme][data-theme] .rd-art-h { filter: drop-shadow(0 2px 0 #3d200b88); }
  html body[data-theme="adventure"][data-theme][data-theme] .daily-systems-dialog .rd-h,
  html body[data-theme="adventure"][data-theme][data-theme] .daily-systems-dialog .daily-systems-section > h3 {
    color: #3d200b; text-shadow: 0 2px 0 #fffaea; font-family: var(--av-font);
  }
  html body[data-theme="adventure"][data-theme][data-theme] .daily-systems-dialog .daily-systems-section {
    background: radial-gradient(100% 24% at 50% 0%, #fff 0 40%, transparent 42%), linear-gradient(180deg, #fffaf0, var(--eq-paper-deep, #f3dcaa));
  }
  html body[data-theme="adventure"][data-theme][data-theme] .daily-systems-dialog .daily-systems-reward {
    display: inline-block; padding: 2px 10px; border-radius: 99px; font-weight: 700; color: var(--eq-brass-ink, #5a3300);
    background: radial-gradient(90% 50% at 50% 10%, #fffbe0 0 40%, transparent 42%), linear-gradient(var(--eq-brass-hi, #fff2b0), var(--eq-brass, #f7c23c));
    box-shadow: 0 0 0 2px var(--eq-brass-deep, #b97a10), 0 2px 0 var(--eq-brass-deep, #b97a10);
  }
  html body[data-theme="adventure"][data-theme][data-theme] .daily-systems-dialog .daily-systems-day.daily-systems-is-finale {
    background: radial-gradient(100% 30% at 50% 0%, #fffbe0 0 40%, transparent 42%), linear-gradient(var(--eq-brass-hi), var(--eq-brass));
  }
  html body[data-theme="adventure"][data-theme][data-theme] .dc-dialog .dc-progress {
    background: url("quest-ui-assets/prize-medal.webp") right 8px top 6px / 34px no-repeat, linear-gradient(180deg, #fffaea, #f7e6bd);
    color: #5a3300; text-shadow: none;
    border: 2px solid #d8b778; border-radius: 20px; box-shadow: inset 0 2px 0 #fff, 0 3px 0 #b48a4a66; padding-right: 10px;
  }
  html body[data-theme="adventure"][data-theme][data-theme] .dc-dialog .dc-prog-top { color: #5a3300; padding-right: 32px; }
  html body[data-theme="adventure"][data-theme][data-theme] .dc-dialog .dc-mark { color: #5a3300; opacity: 1; box-shadow: none; border-radius: 8px; }
  html body[data-theme="adventure"][data-theme][data-theme] .dc-dialog .dc-mark-reward { color: #5a3300; opacity: 1; }
  html body[data-theme="adventure"][data-theme][data-theme] .dc-dialog .dc-mark-ico { color: #0b6c6a; }
  html body[data-theme="adventure"][data-theme][data-theme] .dc-dialog .dc-tile.dc-d7:not(.is-locked) { background: url("adventure-assets/mini-chest.webp") right 4px top 30px / 30px no-repeat, radial-gradient(100% 30% at 50% 0%, #fffbe0 0 40%, transparent 42%), linear-gradient(180deg, var(--eq-brass-hi), var(--eq-brass)); }
  html body[data-theme="adventure"][data-theme][data-theme] .dc-dialog .dc-tile.is-actionable { box-shadow: 0 0 0 3px #6fae3e, 0 5px 0 3px #3d7425; }

  /* Store plaques */
  html body[data-theme="adventure"][data-theme] .rd-plaque {
    color: #f2fffb; text-shadow: 0 1px 0 #073f42; border: 2px solid var(--vs-gold, #efbe48);
    background: radial-gradient(70% 90% at 0% 100%, #6fae3e 0 28%, transparent 29%), linear-gradient(180deg, #ffffff40 0 3px, transparent 3px), linear-gradient(180deg, #1caaa0, #0b6c6a);
    box-shadow: 0 0 0 2px #073f42, 0 4px 0 #073f42;
  }
  html body[data-theme="adventure"][data-theme] .rd-plaque-title { color: #fff2b0; -webkit-text-stroke: 1px #073f42; paint-order: stroke fill; text-shadow: 0 2px 0 #073f42; font-family: var(--av-font); }
  html body[data-theme="adventure"][data-theme] .rd-plaque-art { filter: drop-shadow(0 4px 0 #3d200baa); }
  html body[data-theme="adventure"][data-theme] .rd-tone-vault { background: linear-gradient(180deg, #ffffff40 0 3px, transparent 3px), linear-gradient(180deg, #b06f32, #7a4519 60%, #3d200b); }
  html body[data-theme="adventure"][data-theme] .rd-tone-limits { background: linear-gradient(180deg, #ffffff40 0 3px, transparent 3px), linear-gradient(180deg, #3a8fd0, #1f62a8 60%, #173871); }
  html body[data-theme="adventure"][data-theme] .rd-tone-load .rd-plaque-art { opacity: .85; }
  /* Navigation uses the same treasure vault as its panel, not the old jar glyph. */
  html body[data-theme="adventure"][data-theme][data-theme] :is(.cv-shopnav, .cv-tabs) .cv-ico-jar {
    width: 26px; height: 26px; border: 0; border-radius: 0; box-shadow: none;
    background: url("adventure-assets/coin-vault.webp") center / contain no-repeat;
  }
  html body[data-theme="adventure"][data-theme][data-theme] :is(.cv-shopnav, .cv-tabs) .cv-ico-jar::before,
  html body[data-theme="adventure"][data-theme][data-theme] :is(.cv-shopnav, .cv-tabs) .cv-ico-jar::after { display: none; }
}
@media (forced-colors: active) {
  .rd-plaque { border: 2px solid CanvasText; }
  .rd-art, .rd-plaque-art { forced-color-adjust: none; }
}

/* Reward effects and claimed controls provide the visual confirmation.
   Keep successful receipts available to assistive technology without adding
   persistent panels or pushing the reward controls down. Never hide alerts,
   loading states, recovery actions, or purchase/history receipts. */
:is(.dc-receipt, .ls-receipt, .daily-systems-receipt, #brickWheelResult) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 1px !important;
  max-height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  animation: none !important;
}

/* The calendar's feedback wrapper also has a themed frame. Remove that frame
   only when it contains no visible loading/error feedback. display:contents
   keeps its live-status child accessible rather than hiding its announcement. */
.dc-dialog .dc-feedback:not(:has(> :not([hidden]):not(.dc-receipt))) {
  display: contents !important;
}
