/* A browsable album: original cards, honest ownership and a readable full-color preview. */
.dh-dialog.dh-dialog-collection { width: min(1300px, 100%); height: min(850px, calc(100dvh - 40px)); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; overflow: hidden; padding: 24px; border: 1px solid #c9b98e; border-radius: 10px; box-shadow: 0 24px 80px #020e2966; color-scheme: light; }
.dh-dialog-collection > h2 { flex: none; margin: 0 42px 9px 0; font-family: 'Fraunces', Georgia, serif; font-weight: 900; font-size: 31px; }
.dh-dialog-collection .dh-dialog-close { border: 0; background: #eee6d7; color: #405268; border-radius: 6px; }
.rvc-collection { --rvc-card-width: 120px; min-height: 0; display: flex; flex-direction: column; flex: 1; color: #24384e; font: 13px/1.5 'DM Sans', sans-serif; }
.rvc-topline { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.rvc-topline p { margin: 0; color: #647185; font-size: 12px; }
.rvc-topline > span { flex: none; font-size: 11px; font-weight: 800; color: #7f693c; }
.rvc-account-note { display: flex; justify-content: space-between; align-items: center; gap: 13px; padding: 9px 12px; border: 1px solid #dcd1b7; border-radius: 5px; background: #fbf4e2; color: #7c745d; font-size: 11px; margin-bottom: 17px; }
.rvc-account-note a, .rvc-account-note button { color: #356482; font-size: 11px; font-weight: 800; flex: none; }
.rvc-account-note.is-error { border-color: #d3ac83; }
.rvc-layout { display: grid; grid-template-columns: 145px minmax(0, 1fr) 260px; gap: 20px; min-height: 0; flex: 1; }
.rvc-factions { display: flex; flex-direction: column; gap: 5px; overflow: auto; min-height: 0; }
.rvc-factions button { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px; border: 1px solid transparent; border-radius: 6px; text-align: left; color: #4b5a6b; font-size: 12px; font-weight: 700; }
.rvc-factions img, .rvc-factions > button > svg { width: 26px; height: 26px; flex: none; object-fit: contain; }
.rvc-factions > button > svg { padding: 3px; }
.rvc-factions button > small { margin-left: auto; color: #8d9192; font-size: 10px; font-weight: 500; }
.rvc-factions button[aria-pressed="true"] { background: #102b46; border-color: #102b46; color: #fff6dd; }
.rvc-factions button[aria-pressed="true"] small { color: #e4ce99; }
.rvc-grid-area { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.rvc-filterbar { flex: none; }
.rvc-search { position: relative; display: flex; align-items: center; }
.rvc-search > svg { position: absolute; width: 16px; height: 16px; left: 12px; color: #8c98a3; }
.dh-dialog-collection .rvc-search input { height: 42px; padding: 9px 12px 9px 36px; border: 1px solid #c8c7bd; border-radius: 6px; background: #fffdf7; color: #273e55; font-size: 12px; }
.rvc-selects { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; margin: 12px 0; }
.rvc-selects label { min-width: 0; }
.rvc-selects label > span { display: block; color: #8b826e; font-size: 9px; font-weight: 800; letter-spacing: .04em; margin-bottom: 4px; }
.rvc-selects select { width: 100%; min-width: 0; height: 35px; color: #425268; border: 1px solid #d5cdbb; border-radius: 5px; background: #fffaf0; padding: 5px 8px; font-size: 11px; color-scheme: light; }
.rvc-ownership { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 5px; border-bottom: 1px solid #d7cbb0; }
.rvc-ownership button { color: #81909b; font-size: 11px; font-weight: 700; min-height: 36px; padding: 5px; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.rvc-ownership button small { color: #99998b; font-size: 9px; font-weight: 500; }
.rvc-ownership button[aria-pressed="true"] { color: #264964; border-bottom-color: #a77e31; }
.rvc-results-heading { display: flex; align-items: center; justify-content: space-between; flex: none; padding: 12px 2px 5px; color: #4b6075; font-size: 11px; }
.rvc-results-heading small { font-size: 9px; color: #a1a193; }
.rvc-grid-scroll { min-height: 0; flex: 1; overflow-y: auto; padding: 8px 4px; scrollbar-width: thin; scrollbar-color: #bcb29e transparent; }
.rvc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); align-content: start; gap: 12px 9px; }
.rvc-tile { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; padding: 9px 5px 8px; border: 1px solid transparent; border-radius: 7px; background: #fffbf140; color: #30495a; transition: border-color .15s, background .15s; }
.rvc-tile:not(.rvc-rarity-common) { border-color: rgba(var(--rvc-rgb), .65); background: radial-gradient(ellipse at 50% 44%, rgba(var(--rvc-rgb), .44), transparent 80%), var(--rvc-panel, #e1f0dc); box-shadow: inset 0 0 0 1px rgba(var(--rvc-rgb), .1), 0 3px 10px rgba(var(--rvc-rgb), .12); }
.rvc-tile:not(.rvc-rarity-common)::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: repeating-linear-gradient(125deg, transparent 0 13px, rgba(var(--rvc-rgb), .09) 14px, transparent 15px 29px), radial-gradient(ellipse at 50% 42%, transparent 41%, rgba(var(--rvc-rgb), .32) 42%, transparent 43% 51%, rgba(var(--rvc-rgb), .2) 52%, transparent 53%); pointer-events: none; }
.rvc-tile:not(.rvc-rarity-common)::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(var(--rvc-rgb), .48); border-radius: 4px; clip-path: polygon(0 0, 18px 0, 18px 1px, calc(100% - 18px) 1px, calc(100% - 18px) 0, 100% 0, 100% 18px, calc(100% - 1px) 18px, calc(100% - 1px) calc(100% - 18px), 100% calc(100% - 18px), 100% 100%, calc(100% - 18px) 100%, calc(100% - 18px) calc(100% - 1px), 18px calc(100% - 1px), 18px 100%, 0 100%, 0 calc(100% - 18px), 1px calc(100% - 18px), 1px 18px, 0 18px); pointer-events: none; }
.rvc-tile:hover { border-color: #d3bd85; background: #fff9e8; }
.rvc-tile[aria-pressed="true"] { border-color: #b58d39; background: #f8eccf; box-shadow: 0 0 0 1px #fff8e3 inset; }
.rvc-tile:not(.rvc-rarity-common):hover { border-color: rgb(var(--rvc-rgb)); background: radial-gradient(ellipse at 50% 44%, rgba(var(--rvc-rgb), .65), transparent 85%), var(--rvc-panel, #e1f0dc); }
.rvc-tile:not(.rvc-rarity-common)[aria-pressed="true"] { border-color: #ffe395; outline: 2px solid #b58d39; outline-offset: 1px; background: radial-gradient(ellipse at 50% 44%, rgba(var(--rvc-rgb), .58), transparent 85%), var(--rvc-panel, #e1f0dc); box-shadow: inset 0 0 0 1px #ffe39599; }
.rvc-rarity-uncommon { --rvc-rgb: 37, 160, 123; --rvc-ink: #072e23; --rvc-panel: #e1f0dc; }
.rvc-rarity-rare { --rvc-rgb: 87, 177, 255; --rvc-ink: #0c2b4b; --rvc-panel: #102c51; }
.rvc-rarity-epic { --rvc-rgb: 204, 124, 255; --rvc-ink: #3b194b; --rvc-panel: #342046; }
.rvc-rarity-legendary { --rvc-rgb: 255, 197, 65; --rvc-ink: #73521a; --rvc-panel: #493416; }
.rvc-rarity-label { position: relative; z-index: 2; display: inline-flex; justify-content: center; align-items: center; gap: 5px; min-height: 16px; padding: 1px 8px; border-radius: 20px; background: rgba(var(--rvc-rgb, 0, 0, 0), .09); color: var(--rvc-ink, #718077); font-size: 8px; line-height: 1.5; font-weight: 800; text-transform: uppercase; letter-spacing: .065em; }
.rvc-rarity-label:not(:empty)::before { content: ""; width: 4px; height: 4px; flex: none; background: currentColor; transform: rotate(45deg); }
.rvc-rarity-label:empty { visibility: hidden; }
.rvc-tile:not(.rvc-rarity-common) .rvc-rarity-label { padding: 2px 9px; background: rgb(var(--rvc-rgb)); color: var(--rvc-ink); box-shadow: 0 0 9px rgba(var(--rvc-rgb), .32); }
.rvc-tile:is(.rvc-rarity-rare, .rvc-rarity-epic, .rvc-rarity-legendary) .rvc-card-status { color: #e0f2ff; }
.rvc-tile:is(.rvc-rarity-rare, .rvc-rarity-epic, .rvc-rarity-legendary) .rvc-card-status.is-locked { color: #ffe2a4; }
.rvc-card-stage { position: relative; isolation: isolate; display: block; width: max-content; max-width: 100%; pointer-events: none; }
.rvc-card-stage > .dl-card, .rvc-card-face { position: relative; z-index: 1; }
.rvc-rarity-fx { position: absolute; z-index: 0; inset: 0 -5px; pointer-events: none; }
.rvc-rarity-fx::before { content: ""; position: absolute; inset: 5px 7px; border-radius: 10px; background: radial-gradient(ellipse, rgba(var(--rvc-rgb), .55) 25%, rgba(var(--rvc-rgb), .25) 58%, rgba(var(--rvc-rgb), 0) 74%); box-shadow: 0 0 18px 5px rgba(var(--rvc-rgb), .6); }
.rvc-rarity-fx::after { content: ""; position: absolute; width: calc(100% + 24px); aspect-ratio: 1; left: 50%; top: 50%; background: conic-gradient(transparent 40deg, rgba(var(--rvc-rgb), .9) 65deg, transparent 95deg 220deg, rgba(var(--rvc-rgb), .65) 265deg, transparent 310deg); mask-image: radial-gradient(ellipse, transparent 61%, #000 62% 64%, transparent 65%); -webkit-mask-image: radial-gradient(ellipse, transparent 61%, #000 62% 64%, transparent 65%); animation: rvc-aura-orbit 12s linear infinite; }
.rvc-rarity-uncommon .rvc-rarity-fx::before { opacity: .6; }
.rvc-rarity-uncommon .rvc-rarity-fx::after { display: none; }
.rvc-rarity-legendary .rvc-rarity-fx::before { background: radial-gradient(ellipse at 50% 60%, #ffd77777, #eaa22633 58%, transparent 75%); }
.rvc-rarity-fx i { position: absolute; left: var(--spark-x); top: var(--spark-y); width: 4px; height: 4px; border-radius: 50%; color: rgb(var(--rvc-rgb)); background: #fff9e8; box-shadow: 0 0 3px 1px currentColor, 0 0 8px 2px currentColor; animation: rvc-spark-rise var(--spark-duration) ease-in-out var(--spark-delay) infinite; }
.rvc-rarity-epic .rvc-rarity-fx i, .rvc-rarity-legendary .rvc-rarity-fx i { width: 8px; height: 8px; border-radius: 0; clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%); background: rgb(var(--rvc-rgb)); }
.rvc-tile.is-locked .rvc-rarity-fx { opacity: 1; }
/* Grid tiles: sparkles and orbit run only on hover, so 24 animated tiles don't saturate the GPU on weak devices. */
.rvc-grid .rvc-rarity-fx i, .rvc-grid .rvc-rarity-fx::after { animation-play-state: paused; }
.rvc-grid .rvc-tile:hover .rvc-rarity-fx i, .rvc-grid .rvc-tile:hover .rvc-rarity-fx::after, .rvc-tile[aria-pressed="true"] .rvc-rarity-fx i, .rvc-tile[aria-pressed="true"] .rvc-rarity-fx::after { animation-play-state: running; }
.rvc-tile:hover .rvc-rarity-fx { opacity: 1; }
@keyframes rvc-spark-rise { 0%, 100% { transform: translate3d(0, 12px, 0) scale(.6); opacity: .35; } 35% { opacity: 1; } 75% { transform: translate3d(2px, -17px, 0) scale(1); opacity: .75; } }
@keyframes rvc-aura-orbit { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
.rvc-fx-paused *, .rvc-fx-paused *::before, .rvc-fx-paused *::after { animation-play-state: paused !important; }
.rvc-card-face { display: block; pointer-events: none; padding: 3px 0 2px; }
.rvc-tile.is-locked .rvc-card-face { filter: grayscale(.65); opacity: .65; }
.rvc-tile.is-locked:not(.rvc-rarity-common) .rvc-card-face { filter: grayscale(.25); opacity: .9; }
.rvc-card-status { display: flex; align-items: center; justify-content: center; gap: 4px; color: #758872; font-size: 9px; line-height: 1.35; min-height: 17px; }
.rvc-card-status > svg { width: 12px; height: 12px; }
.rvc-card-status.is-locked { color: #9b7b40; }
.rvc-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; padding-top: 10px; margin-top: 5px; border-top: 1px solid #ded3ba; }
.rvc-pagination button { display: grid; place-items: center; width: 34px; height: 30px; color: #355b78; border: 1px solid #d5cbb4; border-radius: 4px; background: #fffaf0; }
.rvc-pagination button:disabled { opacity: .3; }
.rvc-pagination > span { color: #8b8e88; font-size: 10px; }
.rvc-inspect { min-width: 0; min-height: 0; overflow-y: auto; padding: 4px 12px 12px 20px; border-left: 1px solid #e0d4ba; scrollbar-width: thin; scrollbar-color: #bcb29e transparent; }
.rvc-preview-label { color: #8e7b51; display: block; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin: 3px 0 12px; }
.rvc-preview-face { display: flex; flex-direction: column; align-items: center; gap: 17px; overflow: hidden; padding: 12px 8px 5px; margin: 0 0 15px; pointer-events: none; }
.rvc-preview-face .rvc-rarity-fx { inset-inline: -10px; }
.rvc-preview-face:not(.rvc-rarity-common) { border-radius: 8px; background: radial-gradient(ellipse at 50% 44%, rgba(var(--rvc-rgb), .27), transparent 75%), var(--rvc-panel); border: 1px solid rgba(var(--rvc-rgb), .55); padding: 18px 8px 14px; }
.rvc-preview-face .rvc-rarity-fx::before { inset: 4px 10px; box-shadow: 0 0 28px 8px rgba(var(--rvc-rgb), .65); }
.rvc-preview-face .rvc-rarity-label { font-size: 9px; padding: 3px 12px; }
.rvc-preview-face:not(.rvc-rarity-common) .rvc-rarity-label { background: rgb(var(--rvc-rgb)); color: var(--rvc-ink); }
.rvc-inspect h3 { margin: 0 0 5px; color: #243c52; font-size: 20px; line-height: 1.15; }
.rvc-card-meta { margin: 0 0 11px; color: #a1947d; font-size: 10px; }
.rvc-card-text { margin: 0 0 15px; color: #536578; font-size: 12px; line-height: 1.65; }
.rvc-ability-rules { margin: -3px 0 15px; border: 1px solid #ded3ba; border-radius: 4px; background: #fffbf1; padding: 8px 10px; }
.rvc-ability-rules summary { cursor: pointer; font-size: 10px; font-weight: 800; color: #6d7f8a; }
.rvc-ability-rules p { font-size: 11px; color: #86908e; margin: 10px 0 3px; line-height: 1.6; }
.rvc-ability-rules p > b { display: block; color: #6f7f86; font-size: 10px; margin-bottom: 3px; }
.rvc-card-availability { display: flex; align-items: flex-start; gap: 7px; border: 1px solid #d2dbc5; background: #edf3e8; padding: 10px; border-radius: 5px; }
.rvc-card-availability > svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: #6a8263; }
.rvc-card-availability strong { display: block; color: #637a5c; font-size: 11px; }
.rvc-card-availability span { display: block; margin-top: 4px; color: #7b8777; font-size: 10px; line-height: 1.5; }
.rvc-card-availability.is-locked { border-color: #dbc391; background: #fbefd1; }
.rvc-card-availability.is-locked strong, .rvc-card-availability.is-locked > svg { color: #967533; }
.rvc-card-availability.is-locked span { color: #94866a; }
.rvc-card-availability.is-unknown { background: #f0eee7; border-color: #c9c7bb; }
.rvc-card-availability.is-unknown strong, .rvc-card-availability.is-unknown > svg { color: #818b8c; }
.rvc-card-source { padding-top: 15px; margin-top: 16px; border-top: 1px solid #e1d6bd; }
.rvc-card-source > small { display: block; font-size: 8px; letter-spacing: .08em; color: #a2916c; margin-bottom: 7px; }
.rvc-card-source > strong { font-size: 11px; color: #526374; }
.rvc-card-source > p { color: #8b8e88; font-size: 11px; line-height: 1.6; margin: 7px 0; }
.rvc-copy-limit { display: block; color: #a39b87; font-size: 10px; margin-top: 10px; }
.rvc-source-link { display: block; margin-top: 13px; padding: 8px 0; border-top: 1px solid #dfd1b1; font-size: 11px; font-weight: 800; color: #3f6785; }
.rvc-back { display: none; }
.rvc-no-preview { color: #92998f; font-size: 12px; }
.rvc-empty { grid-column: 1 / -1; padding: 45px 15px; text-align: center; color: #7f8a8f; }
.rvc-empty strong { font-size: 14px; color: #506777; }
.rvc-empty p { font-size: 12px; }
.rvc-empty button { color: #3b6c8a; font-size: 12px; font-weight: 800; padding: 8px; }
.rvc-collection :is(button, input, select, a, summary):focus-visible { outline: 3px solid #5084a7; outline-offset: 2px; }
@media (max-width: 1100px) and (min-width: 901px) {
  .rvc-layout { grid-template-columns: 123px minmax(0, 1fr) 233px; gap: 12px; }
  .rvc-inspect { padding-left: 12px; padding-right: 4px; }
  .rvc-topline p { font-size: 11px; }
  .rvc-factions button { padding-inline: 5px; gap: 5px; font-size: 11px; }
}
@media (max-width: 900px) {
  .dh-dialog.dh-dialog-collection { padding: 21px; }
  .rvc-layout { display: flex; flex-direction: column; gap: 12px; }
  .rvc-factions { flex: none; flex-direction: row; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
  .rvc-factions::-webkit-scrollbar { display: none; }
  .rvc-factions button { flex: none; min-height: 37px; padding: 5px 9px; font-size: 11px; }
  .rvc-factions img, .rvc-factions > button > svg { width: 21px; height: 21px; }
  .rvc-factions small { display: none; }
  .rvc-grid-area { flex: 1; }
  .rvc-inspect { display: none; border: 0; padding: 0 6px 15px; flex: 1; }
  .rvc-detail-open .rvc-grid-area, .rvc-detail-open .rvc-factions, .rvc-detail-open .rvc-topline, .rvc-detail-open [data-rvc-account-note] { display: none; }
  .rvc-detail-open .rvc-inspect { display: block; }
  .rvc-back { display: inline-flex; align-items: center; gap: 7px; color: #557c96; font-size: 12px; font-weight: 800; padding: 9px 0 15px; }
  .rvc-back svg { width: 15px; height: 15px; }
  .rvc-topline { display: block; margin-bottom: 10px; }
  .rvc-topline > span { display: block; margin-top: 5px; }
}
@media (max-width: 540px) {
  .dh-dialog.dh-dialog-collection { padding: 18px 14px; height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
  .dh-dialog-collection > h2 { font-size: 27px; }
  .rvc-topline p { font-size: 11px; line-height: 1.5; }
  .rvc-account-note { display: block; font-size: 10px; padding: 8px 9px; margin-bottom: 10px; }
  .rvc-account-note a { display: inline-block; margin-left: 5px; font-size: 10px; }
  .rvc-layout { gap: 8px; }
  .rvc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rvc-selects { gap: 6px; margin: 9px 0; }
  .rvc-selects select { height: 34px; padding-inline: 5px; font-size: 10px; }
  .rvc-ownership button { font-size: 10px; gap: 4px; padding-inline: 2px; }
  .rvc-ownership button small { font-size: 8px; }
  .rvc-results-heading { padding-top: 8px; }
  .rvc-tile { padding-inline: 3px; }
}
@media (max-width: 370px) { .rvc-collection { --rvc-card-width: 108px; } .rvc-card-status { font-size: 8px; } }
@media (prefers-reduced-motion: reduce) { .rvc-collection *, .rvc-collection *::before, .rvc-collection *::after { transition: none !important; animation: none !important; } .rvc-rarity-fx i { opacity: .75; } .rvc-rarity-fx::after { transform: translate(-50%, -50%) rotate(25deg); } }
