/* Shared interface presentation. Original controls, dimensions and stats remain. */
html[data-theme="vice"] .vice-component-glyph {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
html[data-theme="vice"] .vice-inline-icon {
  display: block;
}
html[data-theme="vice"] .vice-component-glyph > .vice-inline-icon {
  width: 100%;
  height: 100%;
}
html[data-theme="vice"] .vice-component-glyph.skill-badge-art {
  background: none !important;
}
html[data-theme="vice"] .sprite.vice-unit {
  display: inline-block;
  position: relative;
  flex: none;
  overflow: hidden;
  background: none !important;
  animation: none !important;
  image-rendering: pixelated;
}
html[data-theme="vice"] .vice-unit-frame {
  position: absolute;
  width: var(--unit-cell);
  height: var(--unit-cell);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-image: var(
    --unit-atlas,
    url("/themes/vice/assets/urban-combat.png")
  );
  background-size: calc(var(--unit-cell) * var(--unit-columns, 4))
    calc(var(--unit-cell) * var(--unit-rows, 3));
  background-position: 0 calc(var(--unit-row) * var(--unit-cell) * -1);
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
html[data-theme="vice"] .vice-unit--portrait .vice-unit-frame {
  top: 0;
  transform: translateX(-50%);
}
html[data-theme="vice"] .rarity-card {
  background: linear-gradient(135deg, #39233e, #191328 70%);
  clip-path: var(--pixel-corners-small);
}
html[data-theme="vice"] .card-frame {
  background: none !important;
  border: calc(1px * var(--card-scale)) solid var(--rarity);
  box-shadow: inset 0 0 0 calc(1px * var(--card-scale)) #140c21;
}
html[data-theme="vice"] .card-holo {
  background: linear-gradient(
    135deg,
    transparent 10%,
    #ee82bd2e 40%,
    #69d8d943 50%,
    transparent 75%
  );
}
html[data-theme="vice"] .card-back {
  background: linear-gradient(
    135deg,
    #ea6ba9 0 8%,
    #20152f 8% 45%,
    #6bded6 45% 50%,
    #271732 50% 92%,
    #f19ac6 92%
  );
  box-shadow:
    inset 0 0 0 2px #7de1d8,
    inset 0 0 0 5px #27162e;
}
html[data-theme="vice"] #page-root > .room-shade {
  background: linear-gradient(#170d27ad, #1c102dc9);
}
html[data-theme="vice"] .vice-image-proxy {
  display: inline-block;
  position: relative;
  flex: none;
  overflow: hidden;
  vertical-align: middle;
  pointer-events: none;
}
html[data-theme="vice"] .vice-image-proxy .vice-art {
  --sprite-size: var(--proxy-cell, 120px);
  --sprite-rise: 0px;
}
html[data-theme="vice"] .vice-art--interface {
  --sprite-size: 180px;
  --sprite-rise: -6px;
}
html[data-theme="vice"] :is(.forge-art, .product-art, .item-art).vice-art-slot {
  position: relative;
}
html[data-theme="vice"]
  :is(.forge-smith, .porter-loop, .art-merchant, .rift-gate) {
  background-image: none !important;
  animation: none !important;
}
html[data-theme="vice"] .depths-candle {
  background: linear-gradient(
    90deg,
    #1d1230 0 20%,
    #76e7e0 20% 40%,
    #f68ac8 40% 60%,
    #1d1230 60%
  ) !important;
  filter: drop-shadow(0 0 5px #76e7e060);
}
html[data-theme="vice"] [data-urban-component="npc"] {
  overflow: hidden;
}
html[data-theme="vice"] [data-urban-component="npc"] > .vice-unit {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
@media (prefers-reduced-motion: no-preference) {
  html[data-theme="vice"] .vice-unit-frame {
    animation: vice-unit-idle 1.2s steps(4, end) infinite;
  }
  html[data-theme="vice"][data-vice-hidden] .vice-unit-frame {
    animation-play-state: paused;
  }
}
@keyframes vice-unit-idle {
  to {
    background-position-x: calc(var(--unit-cell) * -4);
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="vice"] .vice-unit-frame {
    animation: none !important;
  }
}

/* The city archive is optional ambient art, separate from the owned roster. */
html[data-theme="vice"] .vice-city-archive-footer {
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 10px 12px 0;
  border-top: 2px solid #624467;
}
html[data-theme="vice"] .vice-city-archive-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border: 2px solid #6d687f;
  background: #231a32;
  color: #d9c5dc;
  font: 19px var(--font-display, monospace);
  cursor: pointer;
}
html[data-theme="vice"] .vice-city-archive-link:is(:hover, :focus-visible) {
  color: #fff0df;
  border-color: #76e7e0;
  background: #38223f;
}
html[data-theme="vice"] .vice-city-archive-link-note {
  color: #ab99b4;
  font: 16px var(--font-display, monospace);
}
html[data-theme="vice"] .vice-city-archive {
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
  max-height: min(920px, calc(100dvh - 32px));
  padding: 0;
  margin: auto;
  border: 3px solid #e884b9;
  background: #1b1229;
  color: #fff0df;
  font-family: var(--font-display, monospace);
  box-sizing: border-box;
  box-shadow:
    8px 8px 0 #080711,
    inset 0 0 0 3px #754968;
  overflow: hidden;
}
html[data-theme="vice"] .vice-city-archive[open] {
  display: flex;
  flex-direction: column;
}
html[data-theme="vice"] .vice-city-archive::backdrop {
  background: #0a071bd9;
}
html[data-theme="vice"] .vice-city-archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: none;
  padding: 22px 24px 10px;
  background: linear-gradient(115deg, #452441, #231932);
}
html[data-theme="vice"] .vice-city-archive-kicker {
  margin: 0 0 4px;
  color: #76e7e0;
  font-size: 17px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
html[data-theme="vice"] .vice-city-archive-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  line-height: 1;
}
html[data-theme="vice"] .vice-city-archive-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border: 2px solid #e884b9;
  background: #261a33;
  cursor: pointer;
}
html[data-theme="vice"] .vice-city-archive-close:is(:hover, :focus-visible) {
  outline: 2px solid #76e7e0;
  outline-offset: 3px;
}
html[data-theme="vice"] .vice-city-archive-note {
  flex: none;
  margin: 0;
  padding: 6px 24px 18px;
  font-size: 18px;
  line-height: 1.3;
  color: #c9b5cf;
  border-bottom: 2px solid #644062;
}
html[data-theme="vice"] .vice-city-archive-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  scrollbar-color: #b06d9d #23182e;
}
html[data-theme="vice"] .vice-city-group + .vice-city-group {
  margin-top: 32px;
}
html[data-theme="vice"] .vice-city-group-title {
  color: #ffd0a1;
  margin: 0 0 3px;
  font-size: 28px;
  font-weight: 400;
  text-transform: uppercase;
}
html[data-theme="vice"] .vice-city-group-note {
  margin: 0 0 16px;
  color: #b7a3c4;
  font-size: 18px;
}
html[data-theme="vice"] .vice-city-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(162px, 1fr));
  gap: 14px;
}
html[data-theme="vice"] .vice-contact-card {
  position: relative;
  min-width: 0;
  border: 2px solid #765170;
  box-shadow: 3px 3px 0 #0d0919;
  background: #27182f;
}
html[data-theme="vice"] .vice-contact-portrait {
  height: 182px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(0deg, #151222 0 12%, transparent 12%),
    repeating-linear-gradient(0deg, #23172d00 0 14px, #b9639233 14px 16px),
    radial-gradient(ellipse at 50% 70%, #9b4a7b, #27182f 75%);
}
html[data-theme="vice"] [data-city-group="rival"] .vice-contact-portrait {
  background: radial-gradient(ellipse at 50% 70%, #814258, #211727 75%);
}
html[data-theme="vice"] [data-city-group="service"] .vice-contact-portrait {
  background: radial-gradient(ellipse at 50% 70%, #36777d, #201a31 75%);
}
html[data-theme="vice"] .vice-contact-code {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 5px;
  background: #181222d9;
  color: #79d5d1;
  font-size: 13px;
  letter-spacing: 1px;
}
html[data-theme="vice"] .vice-contact-caption {
  padding: 10px 12px 12px;
  border-top: 2px solid #765170;
}
html[data-theme="vice"] .vice-contact-name {
  margin: 0 0 2px;
  color: #ffabd2;
  font-size: 25px;
  font-weight: 400;
}
html[data-theme="vice"] .vice-contact-role {
  margin: 0;
  color: #d1bfd7;
  font-size: 17px;
  line-height: 1.2;
}
@media (max-width: 540px) {
  html[data-theme="vice"] .vice-city-archive {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  html[data-theme="vice"] .vice-city-archive-header {
    padding: 18px 14px 10px;
    gap: 10px;
  }
  html[data-theme="vice"] .vice-city-archive-note {
    padding: 4px 14px 14px;
  }
  html[data-theme="vice"] .vice-city-archive-body {
    padding: 18px 12px;
  }
  html[data-theme="vice"] .vice-city-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  html[data-theme="vice"] .vice-contact-portrait {
    --archive-unit-size: clamp(120px, 37vw, 156px);
    height: 160px;
  }
  html[data-theme="vice"] .vice-contact-portrait > .vice-unit {
    width: var(--archive-unit-size) !important;
    height: var(--archive-unit-size) !important;
  }
  html[data-theme="vice"] .vice-contact-portrait .vice-unit-frame {
    --unit-cell: var(--archive-unit-size) !important;
  }
  html[data-theme="vice"] .vice-contact-name {
    font-size: 22px;
  }
  html[data-theme="vice"] .vice-contact-role {
    font-size: 16px;
  }
}
