/* v414: รีวิว page - result first. system.md tokens: ink #f0edff, soft #b7b6cc, dim #8a8ea8, gold #f4d38a, green #72dfb2,
   red #ff8293, violet #c6a8ff, sky #7fd8ff. Game pictures carry the colour; the card itself stays quiet. */
.rv-main { display: grid; gap: 18px; width: min(1180px, 100%); margin: 0 auto; padding: 24px 16px 96px; }
.rv-head h1 { margin: 2px 0 4px; color: #f0edff; font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.rv-eyebrow { margin: 0; color: #f4d38a; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.rv-sub { margin: 0; color: #b7b6cc; font-size: 14px; }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: stretch; }
.rv-empty { grid-column: 1 / -1; padding: 24px; color: #8a8ea8; text-align: center; }

.rv-card {
  --tone: #c6a8ff;
  position: relative; display: grid; align-content: start; gap: 12px; padding: 16px; overflow: hidden;
  border: 1px solid rgb(152 140 203 / 18%); border-radius: 18px;
  background: radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--tone) 12%, transparent), transparent 60%), linear-gradient(170deg, rgb(25 28 50 / 96%), rgb(13 15 29 / 96%));
  color: #f0edff; font: inherit; text-align: left; cursor: pointer;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), border-color 160ms ease;
}
.rv-card.is-secret { --tone: #ff6f8a; }
.rv-card.is-mythic { --tone: #7fd8ff; }
.rv-card.is-legendary { --tone: #f4b860; }
.rv-card.is-pearl { --tone: #f6a6d8; }
.rv-card.is-met { border-color: color-mix(in srgb, var(--tone) 34%, transparent); }
.rv-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone) 60%, transparent); }
.rv-card:active { transform: scale(0.98); }
.rv-card:focus-visible { outline: 2px solid #c6a8ff; outline-offset: 2px; }

/* 1) job + status */
.rv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rv-name { display: grid; gap: 1px; min-width: 0; }
.rv-name strong { overflow: hidden; font-size: 16px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.rv-name span { color: #8a8ea8; font-size: 12px; }
.rv-status { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.rv-status.is-met { background: rgb(114 223 178 / 14%); color: #72dfb2; }
.rv-status.is-miss { background: rgb(244 211 138 / 12%); color: #f4d38a; }

/* 2) the result */
.rv-hero { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; }
.rv-art {
  display: grid; width: 76px; height: 76px; place-items: center; overflow: hidden; border-radius: 16px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tone) 38%, transparent), transparent 70%), rgb(8 10 22 / 55%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 40%, transparent);
}
.rv-art img { width: 84%; height: 84%; object-fit: contain; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 45%)); }
.rv-art.is-unit img { width: 100%; height: 100%; object-fit: cover; }
.rv-result { display: grid; gap: 2px; min-width: 0; }
.rv-result b { color: var(--tone); font-size: 32px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rv-card.is-pearl .rv-result b { color: #f4d38a; }
.rv-result span { overflow: hidden; color: #b7b6cc; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

/* 3) when */
.rv-when { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 8px 10px; border-radius: 10px; background: rgb(8 10 22 / 45%); color: #b7b6cc; font-size: 12px; font-variant-numeric: tabular-nums; }
.rv-dot { color: #4a4e68; }

/* 4) rare drops */
.rv-drops { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: rgb(255 111 138 / 7%); box-shadow: inset 0 0 0 1px rgb(255 111 138 / 22%); }
.rv-drops-label { color: #ff8293; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.rv-drop-list { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-drop { position: relative; width: 48px; height: 48px; overflow: hidden; border-radius: 10px; background: radial-gradient(circle at 50% 40%, rgb(255 66 82 / 45%), rgb(22 0 6 / 90%)); box-shadow: inset 0 0 0 1px rgb(255 130 147 / 55%); }
.rv-drop img { width: 100%; height: 100%; object-fit: contain; }
.rv-drop.is-unit img { object-fit: cover; }
.rv-drop b { position: absolute; right: 2px; bottom: 2px; padding: 0 4px; border-radius: 6px; background: rgb(8 10 22 / 78%); color: #fff; font-size: 10px; }

/* 5) units + bar */
.rv-units { display: flex; gap: 6px; }
.rv-face { --hi: #5cc0ff; --lo: #163f96; position: relative; width: 44px; height: 44px; overflow: hidden; border-radius: 10px; background: linear-gradient(165deg, var(--hi), var(--lo)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 22%); }
.rv-face[data-rarity="epic"] { --hi: #c891ff; --lo: #4a1d9c; }
.rv-face[data-rarity="legendary"] { --hi: #ffd864; --lo: #b0560c; }
.rv-face[data-rarity="mythic"] { --hi: #ff7ad9; --lo: #3f8dff; }
.rv-face[data-rarity="secret"] { --hi: #ff4252; --lo: #160006; }
.rv-face img { width: 100%; height: 100%; object-fit: cover; }
.rv-face b { position: absolute; right: 2px; bottom: 2px; padding: 0 4px; border-radius: 6px; background: rgb(8 10 22 / 72%); color: #fff; font-size: 10px; }
.rv-bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid rgb(255 255 255 / 6%); padding-top: 10px; }
.rv-cell { display: grid; justify-items: center; gap: 1px; }
.rv-cell + .rv-cell { border-left: 1px solid rgb(255 255 255 / 6%); }
.rv-cell-art { width: 22px; height: 22px; object-fit: contain; }
.rv-cell b { color: #f0edff; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rv-cell span { color: #8a8ea8; font-size: 10px; white-space: nowrap; }
.rv-cell.is-zero b, .rv-cell.is-zero .rv-cell-art { opacity: .35; }
.rv-more { justify-self: end; color: #c6a8ff; font-size: 12px; font-weight: 800; }

@media (max-width: 560px) {
  .rv-main { padding: 16px 12px 96px; }
  .rv-head h1 { font-size: 22px; }
  .rv-grid { grid-template-columns: minmax(0, 1fr); }
  .rv-hero { grid-template-columns: 64px minmax(0, 1fr); }
  .rv-art { width: 64px; height: 64px; }
  .rv-result b { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .rv-card { transition: border-color 160ms ease; } .rv-card:hover, .rv-card:active { transform: none; } }

/* v417: totals, filters, load more */
.rv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.rv-stat { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgb(21 24 44 / 85%); box-shadow: inset 0 0 0 1px rgb(152 140 203 / 16%); }
.rv-stat-art { width: 34px; height: 34px; object-fit: contain; }
.rv-stat-copy { display: grid; gap: 1px; }
.rv-stat b { color: #f0edff; font-size: 22px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.rv-stat span { color: #8a8ea8; font-size: 12px; }
.rv-stat.is-good b { color: #72dfb2; }
.rv-stat.is-gold b { color: #f4d38a; }
.rv-stat.is-secret b { color: #ff8293; }
.rv-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-chip { padding: 8px 14px; border: 1px solid rgb(152 140 203 / 22%); border-radius: 999px; background: rgb(21 24 44 / 85%); color: #b7b6cc; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background 140ms ease, color 140ms ease, border-color 140ms ease; }
.rv-chip:hover { border-color: rgb(198 168 255 / 50%); color: #f0edff; }
.rv-chip[aria-pressed="true"] { border-color: rgb(198 168 255 / 70%); background: rgb(198 168 255 / 18%); color: #f0edff; }
.rv-chip.is-mine { border-color: rgb(244 211 138 / 40%); color: #f4d38a; }
.rv-chip.is-mine[aria-pressed="true"] { background: rgb(244 211 138 / 16%); color: #f4d38a; }
.rv-chip:focus-visible, .rv-loadmore:focus-visible { outline: 2px solid #c6a8ff; outline-offset: 2px; }
.rv-loadmore { justify-self: center; min-width: 220px; padding: 12px 20px; border: 1px solid rgb(198 168 255 / 40%); border-radius: 999px; background: rgb(198 168 255 / 12%); color: #f0edff; font: inherit; font-weight: 800; cursor: pointer; }
.rv-loadmore:disabled { opacity: .6; cursor: progress; }
@media (max-width: 560px) { .rv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rv-stat:last-child:nth-child(odd) { grid-column: 1 / -1; } .rv-stat b { font-size: 18px; } .rv-stat-art { width: 28px; height: 28px; } }

/* v617 result-screen cards (reviews.js card()). Tone colour = the result's rarity; gold = success; the burst and ribbon are the
   only loud parts, the rest keeps system.md's quiet panel. */
.rv-card.rvx { gap: 0; padding: 0; border-radius: 20px; background: linear-gradient(175deg, rgb(28 30 56 / 98%), rgb(12 14 28 / 98%)); }
.rvx-ribbon { position: relative; z-index: 2; display: grid; justify-items: center; gap: 2px; padding: 12px 16px 0; }
.rvx-ribbon-text { position: relative; padding: 5px 30px 6px; background: linear-gradient(180deg, #ffd978, #e3a12f); color: #4b2a00; font-size: 17px; font-weight: 800; letter-spacing: .02em;
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%); text-shadow: 0 1px 0 rgb(255 255 255 / 40%); }
.rv-card.is-miss .rvx-ribbon-text { background: linear-gradient(180deg, #8f93b3, #5d6182); color: #1b1d33; text-shadow: none; }
.rvx-stars { display: flex; gap: 4px; margin-top: 2px; font-size: 22px; line-height: 1; }
.rvx-stars i { color: rgb(255 255 255 / 14%); font-style: normal; }
.rvx-stars i.is-lit { color: #ffd65a; text-shadow: 0 0 12px rgb(255 214 90 / 55%); }
.rvx-stars i:nth-child(2) { transform: translateY(-4px); font-size: 26px; }
.rvx-stage { position: relative; isolation: isolate; display: grid; justify-items: center; gap: 2px; padding: 6px 16px 14px; text-align: center; }
.rvx-stage::before { position: absolute; z-index: -1; top: -18px; left: 50%; width: 260px; height: 260px; transform: translateX(-50%);
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--tone) 26%, transparent) 0deg 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0 22%, transparent 62%); mask: radial-gradient(circle, #000 0 22%, transparent 62%); content: ""; }
.rv-card.is-miss .rvx-stage::before { opacity: .35; }
.rvx-art { display: grid; width: 96px; height: 96px; place-items: center; overflow: hidden; border-radius: 22px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tone) 45%, transparent), rgb(8 10 22 / 80%) 72%); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 55%, transparent), 0 10px 30px rgb(0 0 0 / 40%); }
.rvx-art img { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 6px 12px rgb(0 0 0 / 50%)); }
.rvx-art.is-unit img { width: 100%; height: 100%; object-fit: cover; }
.rvx-value { margin-top: 8px; color: var(--tone); font-size: 34px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-shadow: 0 2px 14px color-mix(in srgb, var(--tone) 40%, transparent); }
.rv-card.is-pearl .rvx-value { color: #ffd65a; }
.rvx-label { max-width: 100%; overflow: hidden; color: #b7b6cc; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.rvx-job { display: grid; gap: 1px; margin: 0 16px; padding: 12px 0; border-top: 1px solid rgb(255 255 255 / 7%); text-align: center; }
.rvx-job strong { overflow: hidden; color: #f0edff; font-size: 16px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.rvx-job span { color: #8a8ea8; font-size: 12px; }
.rvx-loot { display: grid; gap: 6px; margin: 0 16px 12px; }
.rvx-loot-label { color: #8a8ea8; font-size: 11px; font-weight: 700; }
.rvx-loot-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.rvx-tile { --hi: #5cc0ff; --lo: #163f96; position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: linear-gradient(160deg, var(--hi), var(--lo)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 25%), 0 3px 8px rgb(0 0 0 / 30%); }
.rvx-tile[data-rarity="epic"] { --hi: #c891ff; --lo: #4a1d9c; }
.rvx-tile[data-rarity="legendary"] { --hi: #ffd864; --lo: #b0560c; }
.rvx-tile[data-rarity="mythic"] { --hi: #ff7ad9; --lo: #3f8dff; }
.rvx-tile[data-rarity="secret"] { --hi: #ff4252; --lo: #3a0010; }
.rvx-tile img { width: 100%; height: 100%; object-fit: contain; }
.rvx-tile.is-unit img { object-fit: cover; }
.rvx-tile b { position: absolute; right: 2px; bottom: 2px; padding: 0 4px; border-radius: 6px; background: rgb(8 10 22 / 78%); color: #fff; font-size: 10px; font-weight: 800; }
.rvx-tile.is-more { display: grid; place-items: center; background: rgb(255 255 255 / 6%); color: #b7b6cc; font-size: 13px; font-weight: 800; }
.rvx-resources { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: 0 16px 12px; }
.rvx-res { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 0 6px; border-radius: 10px; background: rgb(8 11 22 / 55%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 6%); }
.rvx-res img { width: 20px; height: 20px; object-fit: contain; }
.rvx-res b { color: #f0edff; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rvx-res.is-zero { opacity: .4; }
.rvx-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 10px 16px; border-top: 1px solid rgb(255 255 255 / 6%); background: rgb(8 10 22 / 35%); color: #8a8ea8; font-size: 11px; font-variant-numeric: tabular-nums; }
.rvx-open { color: #c6a8ff; font-size: 12px; font-weight: 800; }
@media (max-width: 560px) { .rvx-value { font-size: 30px; } .rvx-art { width: 84px; height: 84px; } }

/* v618 owner "ย่อ": the totals are one compact strip, the filters smaller */
.rv-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 4px; border-radius: 16px; background: rgb(21 24 44 / 85%); box-shadow: inset 0 0 0 1px rgb(152 140 203 / 16%); }
.rv-stat { flex-direction: column; justify-content: center; gap: 2px; padding: 8px 4px; border-radius: 0; background: none; box-shadow: none; text-align: center; }
.rv-stat + .rv-stat { border-left: 1px solid rgb(255 255 255 / 6%); }
.rv-stat-art { width: 22px; height: 22px; }
.rv-stat-copy { justify-items: center; }
.rv-stat b { font-size: 18px; }
.rv-stat span { font-size: 11px; line-height: 1.3; }
.rv-filters { gap: 6px; }
.rv-chip { padding: 5px 11px; font-size: 12px; }
@media (max-width: 560px) {
  .rv-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 4px; }
  .rv-stat:last-child:nth-child(odd) { grid-column: auto; }
  .rv-stat:nth-child(4) { border-left: 0; }
  .rv-stat b { font-size: 16px; }
  .rv-stat-art { width: 20px; height: 20px; }
}
@media (max-width: 560px) {
  .rv-head .rv-sub { display: none; }
  .rv-stats .rv-stat-art { display: none; }
  .rv-stats .rv-stat { padding: 6px 2px; }
  .rv-stats .rv-stat span { font-size: 10px; }
}

/* v623 the card becomes the job poster (job-poster.js thumb) */
.rv-card.rvx.rvp { display: grid; gap: 0; padding: 0; overflow: hidden; background: #0b0c1c; }
.rvp-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 1350; }
.rv-card.rvp .rvx-foot { border-top: 0; }

/* v644 poster still drawing: poster-shaped placeholder instead of the old card */
.rv-card.rvx.rvp-wait { display: grid; padding: 0; overflow: hidden; background: linear-gradient(110deg, #10122a 30%, #1a1d3c 50%, #10122a 70%) 0 0 / 300% 100%; animation: rvp-shimmer 1.6s linear infinite; aspect-ratio: 1200 / 1350; }
.rv-card.rvx.rvp-wait > * { visibility: hidden; }
@keyframes rvp-shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .rv-card.rvx.rvp-wait { animation: none; } }
