/* Obsidian & Porcelain: metallic UI frame, original color for character art. */
.kc-page, .kc-hero-view {
  --kc-collection-bg:#050505;
  --kc-collection-surface:#0d0d0d;
  --kc-collection-violet:#ddd;
  --kc-collection-red:#fafafa;
  --kc-common:#858585;
  --kc-rare:#f6f6f6;
  --kc-epic:#bfbfbf;
  --kc-legendary:#e7e7e7;
}
.kc-page .kc-tabs button[aria-pressed="true"] {
  color:#050505;
  background:#fafafa;
  border-color:#fafafa;
  box-shadow:none;
}
.kc-page .kc-card.kc-locked, .kc-page.kc-clean-album .kc-grid .kc-card.kc-locked { border-color:#ffffff26; }
.kc-page.kc-clean-album .kc-grid .kc-card.kc-locked .kc-art,
.kc-page .kc-card.kc-locked .kc-art { background:radial-gradient(ellipse at 50% 38%, #303030,#171717 60%,#111 90%); }
.kc-page .kc-card .kc-card-info, .kc-page .kc-card.kc-owned .kc-card-info,
.kc-page.kc-clean-album .kc-grid .kc-card .kc-card-info {
  background:linear-gradient(transparent,#0d0d0de8 55%,#0d0d0d);
}
.kc-page .kc-card.kc-owned .kc-card-back { background:repeating-linear-gradient(0deg,transparent 0 13px,#ffffff08 14px 15px),#141414; }
.kc-card .kc-file-code,.kc-card .kc-file-group,.kc-card .kc-file-intro,
.kc-card .kc-card-group,.kc-card .kc-card-details small { color:#c6c6c6; }
.kc-card .kc-file-footer { border-color:#ffffff38; }
.kc-page .kc-card.kc-foil-shine { --kc-glint:#ffffff75; }
.kc-page .kc-card .kc-rarity { background:#0d0d0de8; border-color:#ffffff38; color:#ededed; }
.kc-page .kc-card .kc-rarity i { background:currentColor; box-shadow:none; }
.kc-hero-view .kc-inspect-foil {
  opacity:.38;
  mix-blend-mode:screen;
  background:radial-gradient(circle at var(--kc-glare-x,50%) var(--kc-glare-y,50%),#fff8,transparent 48%),
    linear-gradient(132deg,transparent 31%,#fff3 44%,transparent 57%);
}
.kc-hero-view .kc-inspect-hud { background:linear-gradient(#050505d8,transparent 21% 62%,#050505e5 92%); text-shadow:0 2px 10px #050505; }
.kc-hero-view .kc-inspect-name { background-image:linear-gradient(112deg,#fafafa,var(--kc-tier,#ddd) 61%,#fafafa 85%); }
.kc-hero-view .kc-inspect-hud small { color:#e0e0e0; }
.kc-hero-view .kc-inspect-control { perspective:1000px; }
.kc-hero-view .kc-inspect-control:focus-visible { outline-color:#fff; }

.kcs-showcase,.kcs-editor {
  background:#0d0d0d; border-color:#ffffff26; color:#fafafa;
}
.kcs-editor::backdrop { background:#050505d4; }
.kcs-showcase .kcs-tile { background:radial-gradient(ellipse at 50% 35%,#313131,#111 76%); }
.kcs-showcase .kcs-card-text { background:linear-gradient(transparent,#0d0d0df0 65%); }
.kcs-showcase :is(.kcs-card-text small,.kcs-muted,.kcs-feedback),
.kcs-editor :is(.kcs-muted,.kcs-feedback,.kcs-fieldset legend) { color:#c6c6c6; }
.kcs-showcase .kcs-button,.kcs-editor .kcs-button { background:#161616; border-color:#ffffff35; color:#fafafa; }
.kcs-showcase .kcs-button:hover:not(:disabled),.kcs-editor .kcs-button:hover:not(:disabled) { background:#232323; }
.kcs-editor .kcs-button.kcs-save { background:#fafafa; color:#050505; }
.kcs-editor .kcs-button.kcs-save:hover:not(:disabled) { background:#dedede; }
.kcs-editor .kcs-fieldset { border-color:#ffffff26; }
.kcs-editor .kcs-choice input { accent-color:#fafafa; }
.kcs-rarity { font:650 clamp(8px,1.6vw,11px)/1.15 ui-monospace,monospace; color:#dedede; }

/* Same finish in the album, profile collection and AniCoin storefront.
   Preserve the original colors of artwork and equippable cosmetics. */
.kc-obsidian-card {
  --kc-chrome-rim:#ffffff26;
  --kc-chrome-inset:#ffffff15;
  --kc-chrome-glare:.28;
  transition:transform .2s cubic-bezier(.22,1,.36,1);
}
.kc-obsidian-card:is(.kc-tier-rare,.kcs-rare,[data-rarity="rare"]) {
  --kc-chrome-rim:#ffffff99;
  --kc-chrome-inset:#ffffff45;
  --kc-chrome-glare:.46;
}
.kc-obsidian-card:is(.kc-tier-epic,.kcs-epic,[data-rarity="epic"]) {
  --kc-chrome-rim:#ffffff65;
  --kc-chrome-inset:#dedede;
  --kc-chrome-glare:.52;
}
.kc-obsidian-card:is(.kc-tier-legendary,.kcs-legendary,[data-rarity="legendary"],[data-rarity="mythic"]) {
  --kc-chrome-rim:#e7e7e7;
  --kc-chrome-inset:#ffffff7d;
  --kc-chrome-glare:.62;
}
.kc-obsidian-card:is(.kc-page .kc-card,.kc-page.kc-clean-album .kc-grid .kc-card,.kcs-showcase .kcs-tile,#shop.komi-shop-v3 .sv3-item) {
  border:1px solid var(--kc-chrome-rim);
}
#shop.komi-shop-v3 .sv3-item.kc-obsidian-card {
  position:relative;
  isolation:isolate;
  background:#0d0d0d;
  transition:transform .2s cubic-bezier(.22,1,.36,1),border-color .2s,background-color .2s;
}
#shop.komi-shop-v3 .sv3-balance strong [data-shop-wallet] {
  font:inherit;
  letter-spacing:inherit;
  color:#fafafa;
  font-variant-numeric:tabular-nums;
  white-space:normal;
  overflow-wrap:anywhere;
}
#shop.komi-shop-v3 .sv3-item.kc-obsidian-card .komi-shop-rarity {
  background:#161616;
  border-color:#ffffff26;
  color:#fafafa;
}
.kc-obsidian-card:is(.kc-page .kc-card,.kc-page.kc-clean-album .kc-grid .kc-card,.kcs-showcase .kcs-tile,#shop.komi-shop-v3 .sv3-item)::after {
  content:"";
  position:absolute;
  z-index:4;
  display:block;
  pointer-events:none;
  inset:3px;
  border:1px solid var(--kc-chrome-inset);
  border-radius:inherit;
  opacity:.68;
}
.kc-obsidian-card:is(.kc-page .kc-card.kc-tier-common,.kc-page.kc-clean-album .kc-grid .kc-card.kc-tier-common,.kcs-showcase .kcs-tile.kcs-common,#shop.komi-shop-v3 .sv3-item[data-rarity="common"])::after {
  border:0;
}
.kc-obsidian-card:is(.kc-page .kc-card.kc-tier-epic,.kc-page.kc-clean-album .kc-grid .kc-card.kc-tier-epic,.kcs-showcase .kcs-tile.kcs-epic,#shop.komi-shop-v3 .sv3-item[data-rarity="epic"])::after {
  border:3px double var(--kc-chrome-inset);
  box-shadow:0 0 12px #fff3,inset 0 0 9px #fff2;
}
.kc-obsidian-card:is(.kc-page .kc-card.kc-tier-legendary,.kc-page.kc-clean-album .kc-grid .kc-card.kc-tier-legendary,.kcs-showcase .kcs-tile.kcs-legendary,#shop.komi-shop-v3 .sv3-item:is([data-rarity="legendary"],[data-rarity="mythic"]))::after {
  border:1px solid transparent;
  padding:2px;
  background:linear-gradient(135deg,#fff 8%,#737373 44%,#fff 76%) 0 50%/265% 100% border-box;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask-composite:exclude;
  opacity:.9;
}
.kc-obsidian-card:is(.kc-page .kc-card,.kcs-showcase .kcs-tile,#shop.komi-shop-v3 .sv3-item) > .kc-card-glare {
  position:absolute;
  z-index:3;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  mix-blend-mode:screen;
  transition:opacity .22s cubic-bezier(.22,1,.36,1);
  background:radial-gradient(ellipse at var(--kc-glare-x,50%) var(--kc-glare-y,50%),#fff9 0,transparent 48%),
    repeating-linear-gradient(132deg,transparent 0 9px,#dedede30 10px,#fafafa24 11px,transparent 14px 21px);
  opacity:0;
}
/* Legacy album hover did not distinguish a mouse from a sticky touch hover. */
.kc-page .kc-grid .kc-owned.kc-obsidian-card:not(.kc-tilt-active):not(.kc-flipped):hover .kc-card-glare {
  opacity:0;
}
@media (any-hover:hover) and (any-pointer:fine) and (prefers-reduced-motion:no-preference) {
  html:not([data-komi-motion="limited"]) .kc-obsidian-card.kc-tilt-active:is(.kc-page .kc-grid .kc-owned,.kc-page .kc-result .kc-owned,.kcs-showcase .kcs-tile,#shop.komi-shop-v3 .sv3-item):not(.kc-flipped) {
    transform:perspective(1000px) rotateX(var(--kc-tilt-x,0deg)) rotateY(var(--kc-tilt-y,0deg));
    position:relative;
    z-index:2;
    transition-duration:.12s;
  }
  html:not([data-komi-motion="limited"]) .kc-obsidian-card.kc-tilt-active:is(.kc-page .kc-card,.kcs-showcase .kcs-tile,#shop.komi-shop-v3 .sv3-item):not(.kc-flipped) > .kc-card-glare {
    opacity:var(--kc-chrome-glare);
  }
}
@media (prefers-reduced-motion:no-preference) {
  html:not([data-komi-motion="limited"]) .kc-obsidian-card:is(.kc-tier-epic,.kcs-epic,[data-rarity="epic"]):is(.kc-tilt-active,:focus-within)::after {
    animation:kc-silver-pulse 1.8s cubic-bezier(.22,1,.36,1) infinite alternate;
  }
  html:not([data-komi-motion="limited"]) .kc-obsidian-card:is(.kc-tier-legendary,.kcs-legendary,[data-rarity="legendary"],[data-rarity="mythic"]):is(.kc-tilt-active,:focus-within)::after {
    animation:kc-chrome-shift 2.4s cubic-bezier(.22,1,.36,1) infinite alternate;
  }
}
@keyframes kc-silver-pulse { from{opacity:.62} to{opacity:1} }
@keyframes kc-chrome-shift { from{background-position:0 50%} to{background-position:100% 50%} }
@media (prefers-reduced-motion:reduce) {
  .kc-obsidian-card:is(.kc-page .kc-card,.kcs-showcase .kcs-tile,#shop.komi-shop-v3 .sv3-item) {
    transform:none!important;
    transition:none!important;
  }
}
@media (forced-colors:active) {
  .kc-obsidian-card::after { display:none!important; }
}
.kc-hero-view .kc-tier-epic .kc-inspect-frame {border:3px double #dedede;}
.kc-hero-view .kc-tier-legendary .kc-inspect-frame {
  border:2px solid transparent;
  background:linear-gradient(#111,#111) padding-box,linear-gradient(130deg,#494949,#fff 24%,#7c7c7c 42%,#eee 70%,#5a5a5a) border-box;
}
