/* v394: finished-job list + review window. system.md tokens; loot and unit cards use the reward-card colours (item-rarity.css). */
.jr-list { display: grid; gap: 6px; margin-top: 12px; }
.jr-list[hidden] { display: none; }
.jr-list-title { margin: 0 0 2px; color: #b7b6cc; font-size: 13px; font-weight: 700; }
.jr-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid rgb(255 255 255 / 6%); border-radius: 12px; background: rgb(8 11 22 / 42%); color: #f0edff; font: inherit; text-align: left; cursor: pointer; }
.jr-row:hover { border-color: rgb(198 168 255 / 35%); }
.jr-row-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgb(114 223 178 / 14%); color: #72dfb2; font-weight: 800; }
.jr-row-text { display: grid; min-width: 0; }
.jr-row-text strong { overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.jr-row-text small { color: #8a8ea8; font-size: 11px; }
.jr-row-go { color: #c6a8ff; font-size: 12px; font-weight: 800; white-space: nowrap; }

.jr-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: start center; overflow-y: auto; padding: 32px 16px; background: rgb(4 6 14 / 72%); backdrop-filter: blur(4px); }
.jr-sheet { position: relative; display: grid; gap: 14px; width: min(760px, 100%); padding: 18px; border: 1px solid rgb(152 140 203 / 20%); border-radius: 18px; background: linear-gradient(165deg, rgb(27 30 54 / 98%), rgb(14 17 32 / 98%)); box-shadow: 0 30px 60px rgb(0 0 0 / 50%); color: #f0edff; }
.jr-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 10px; background: rgb(8 11 22 / 50%); color: #b7b6cc; font: inherit; cursor: pointer; }
.jr-loading { margin: 24px 0; color: #b7b6cc; text-align: center; }
.jr-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 48px 14px 16px; border: 1px solid rgb(114 223 178 / 28%); border-radius: 14px; background: radial-gradient(ellipse at 0% 0%, rgb(114 223 178 / 12%), transparent 60%), rgb(8 11 22 / 35%); }
.jr-hero h3 { margin: 2px 0; font-size: 20px; font-weight: 800; }
.jr-eyebrow { margin: 0; color: #72dfb2; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.jr-sub { margin: 0; color: #b7b6cc; font-size: 12px; }
.jr-badge { padding: 6px 12px; border-radius: 999px; background: rgb(114 223 178 / 14%); color: #72dfb2; font-size: 12px; font-weight: 800; }
.jr-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.jr-tile { display: grid; gap: 2px; padding: 10px; border: 1px solid rgb(255 255 255 / 6%); border-radius: 12px; background: rgb(8 11 22 / 42%); text-align: center; }
.jr-tile b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.jr-tile span { color: #8a8ea8; font-size: 11px; }
.jr-tile.is-good b { color: #72dfb2; }
.jr-section { display: grid; gap: 8px; }
.jr-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.jr-section-head h4 { margin: 0; font-size: 14px; font-weight: 800; }
.jr-section-head span { color: #8a8ea8; font-size: 12px; }

/* loot cards: reward-card look */
.jr-loot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.jr-loot-grid.is-small { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.jr-loot { --hi: #9aa0b6; --lo: #3d4256; position: relative; isolation: isolate; display: grid; justify-items: center; gap: 4px; padding: 10px 6px 8px; overflow: hidden; border-radius: 12px; background: linear-gradient(165deg, var(--hi), var(--lo) 80%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 24%), inset 0 1px 0 rgb(255 255 255 / 38%); text-align: center; }
.jr-loot::before, .jr-unit::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(90% 55% at 50% 0%, rgb(255 255 255 / 30%), transparent 70%), repeating-linear-gradient(135deg, rgb(255 255 255 / 7%) 0 2px, transparent 2px 9px), linear-gradient(180deg, transparent 55%, rgb(0 0 0 / 42%)); }
.jr-loot[data-rarity="pearls"] { --hi: #ffb0e2; --lo: #7b45d6; }
.jr-loot[data-rarity="rare"] { --hi: #5cc0ff; --lo: #163f96; }
.jr-loot[data-rarity="epic"] { --hi: #c891ff; --lo: #4a1d9c; }
.jr-loot[data-rarity="legendary"] { --hi: #ffd864; --lo: #b0560c; }
.jr-loot[data-rarity="plain"] { --hi: #3a3f5a; --lo: #1a1d30; }
.jr-loot-art { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: rgb(6 8 18 / 34%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%); }
.jr-loot-art img { width: 36px; height: 36px; object-fit: contain; }
.jr-loot-name { min-height: 28px; color: #fff; font-size: 11px; font-weight: 700; line-height: 14px; text-shadow: 0 1px 2px rgb(0 0 0 / 50%); }
.jr-loot-count { padding: 1px 10px; border-radius: 999px; background: rgb(8 10 22 / 62%); color: #7fd8ff; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.jr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jr-chip { padding: 5px 10px; border: 1px solid rgb(127 216 255 / 30%); border-radius: 999px; background: rgb(127 216 255 / 8%); color: #bfe9ff; font-size: 12px; font-weight: 700; }

/* units: game picture cards */
.jr-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.jr-unit { --hi: #5cc0ff; --lo: #163f96; position: relative; isolation: isolate; display: grid; overflow: hidden; border-radius: 12px; background: linear-gradient(165deg, var(--hi), var(--lo) 80%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 24%); }
.jr-unit[data-rarity="epic"] { --hi: #c891ff; --lo: #4a1d9c; }
.jr-unit[data-rarity="legendary"] { --hi: #ffd864; --lo: #b0560c; }
.jr-unit[data-rarity="mythic"] { --hi: #ff7ad9; --lo: #3f8dff; }
.jr-unit[data-rarity="secret"] { --hi: #ff4252; --lo: #160006; }
.jr-unit-art { width: 100%; aspect-ratio: 1; object-fit: cover; }
.jr-unit-name { padding: 4px 6px 0; overflow: hidden; color: #fff; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.jr-unit-count { justify-self: start; margin: 2px 6px 6px; padding: 0 8px; border-radius: 999px; background: rgb(8 10 22 / 62%); color: #7fd8ff; font-size: 12px; }
.jr-empty { grid-column: 1 / -1; margin: 0; padding: 12px; border: 1px dashed rgb(255 255 255 / 10%); border-radius: 12px; color: #8a8ea8; font-size: 12px; text-align: center; }

@media (max-width: 560px) {
  .jr-backdrop { padding: 12px 8px; }
  .jr-sheet { padding: 12px; gap: 12px; }
  .jr-tiles, .jr-loot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jr-units { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jr-hero h3 { font-size: 17px; }
}
/* v483: one "ประวัติการจ้าง" button under the plan opens every finished job */
.jr-history { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 1px solid rgb(198 168 255 / 22%); border-radius: 12px; background: rgb(8 11 22 / 42%); color: #f0edff; font: inherit; text-align: left; cursor: pointer; }
.jr-history:hover { border-color: rgb(198 168 255 / 45%); }
.jr-history-icon { font-size: 18px; }
.jr-history-text { flex: 1; font-size: 13px; font-weight: 800; }
.jr-history-count { color: #c6a8ff; font-size: 12px; font-weight: 800; white-space: nowrap; }
.jr-history-sheet { display: grid; gap: 6px; align-content: start; }
.jr-history-title { margin: 0 40px 6px 0; color: #f0edff; font-size: 16px; font-weight: 800; }

/* v618 review window as a game result screen (same ribbon and stars as reviews.css .rvx-*) */
.jrx-hero { position: relative; isolation: isolate; display: grid; justify-items: center; gap: 4px; padding: 18px 48px 16px; overflow: hidden; border-color: rgb(255 214 90 / 30%); text-align: center;
  background: rgb(8 11 22 / 35%); }
.jrx-hero::before { position: absolute; z-index: -1; top: -60px; left: 50%; width: 360px; height: 360px; transform: translateX(-50%);
  background: repeating-conic-gradient(from 0deg, rgb(255 214 90 / 14%) 0deg 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0 20%, transparent 62%); mask: radial-gradient(circle, #000 0 20%, transparent 62%); content: ""; }
.jrx-hero.is-running { border-color: rgb(127 216 255 / 30%); }
.jrx-hero.is-running .rvx-ribbon-text { background: linear-gradient(180deg, #a9e6ff, #4aa6d8); color: #062537; }
.jrx-hero h3 { margin: 6px 0 0; font-size: 22px; }
.jrx-hero .rvx-ribbon-text { position: relative; padding: 5px 30px 6px; background: linear-gradient(180deg, #ffd978, #e3a12f); color: #4b2a00; font-size: 17px; font-weight: 800;
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%); }
.jrx-hero .rvx-stars { display: flex; gap: 4px; font-size: 22px; line-height: 1; }
.jrx-hero .rvx-stars i { color: rgb(255 255 255 / 14%); font-style: normal; }
.jrx-hero .rvx-stars i.is-lit { color: #ffd65a; text-shadow: 0 0 12px rgb(255 214 90 / 55%); }
.jrx-hero .rvx-stars i:nth-child(2) { transform: translateY(-4px); font-size: 26px; }
.jr-tile { position: relative; padding-top: 12px; }
.jr-tile-icon { display: block; font-size: 18px; font-style: normal; line-height: 1; }
.jr-tile b { font-size: 18px; }
.jr-loot[data-rarity="mythic"] { --hi: #ff7ad9; --lo: #3f8dff; }
.jr-loot[data-rarity="secret"] { --hi: #ff4252; --lo: #3a0010; }

/* v619 job poster (job-poster.js): the canvas picture on top of the review window, a download button, and the owner's editor */
.jp { display: grid; gap: 10px; }
.jp-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 1350; border-radius: 14px; background: #0b0c1c; box-shadow: 0 14px 34px rgb(0 0 0 / 40%); }
.jp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.jp-btn { min-height: 40px; padding: 0 16px; border: 1px solid rgb(198 168 255 / 30%); border-radius: 12px; background: rgb(198 168 255 / 8%); color: #f0edff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color 160ms, border-color 160ms, transform 120ms; }
.jp-btn:hover:not(:disabled) { border-color: rgb(198 168 255 / 60%); background: rgb(198 168 255 / 16%); }
.jp-btn:active:not(:disabled) { transform: scale(.97); }
.jp-btn:disabled { opacity: .55; cursor: default; }
.jp-btn.is-main { border-color: transparent; background: #ffc65a; color: #2a1700; }
.jp-btn.is-main:hover:not(:disabled) { background: #ffd57e; }
.jp-btn:focus-visible, .jp-chip:focus-visible, .jp-input:focus-visible { outline: 2px solid #7fd8ff; outline-offset: 2px; }
.jp-editor { display: grid; gap: 10px; padding: 14px; border: 1px solid rgb(152 140 203 / 20%); border-radius: 14px; background: rgb(8 11 22 / 45%); }
.jp-editor[hidden] { display: none; }
.jp-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 10px; }
.jp-label { color: #b7b6cc; font-size: 13px; font-weight: 700; }
.jp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jp-chip { min-height: 34px; padding: 0 12px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 999px; background: rgb(255 255 255 / 4%); color: #d9d6ef; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.jp-chip[aria-pressed="true"] { border-color: #ffc65a; background: rgb(255 198 90 / 16%); color: #ffdf8a; }
.jp-input { min-height: 38px; padding: 0 12px; border: 1px solid rgb(255 255 255 / 12%); border-radius: 10px; background: rgb(4 6 14 / 60%); color: #f0edff; font: inherit; font-size: 14px; }
.jp-status { margin: 0; color: #8a8ea8; font-size: 12px; }
.jp-status.is-warn { color: #ffc65a; }
@media (max-width: 560px) { .jp-row { grid-template-columns: 1fr; gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .jp-btn { transition: none; } }
.jr-close + .jp { margin-top: 34px; }
/* v622 add-on marks */
.jr-chip.is-addon { border-color: rgb(127 216 255 / 55%); background: rgb(127 216 255 / 14%); color: #7fd8ff; }
.jr-unit-addon { position: absolute; top: 6px; left: 6px; padding: 1px 8px; border-radius: 999px; background: #6fe3ff; color: #062537; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
/* v629 "ผลงานตอนนี้" (poster of the running job) above the history button */
.jr-history.is-live { border-color: rgb(255 198 90 / 40%); background: linear-gradient(100deg, rgb(255 198 90 / 12%), rgb(8 11 22 / 42%) 60%); }
.jr-history.is-live .jr-history-count { color: #ffc65a; }
.jr-list .jr-history + .jr-history { margin-top: 6px; }
