/* Mine Vice Coin is a skin over the real game, not a second home implementation.
 * Every rule is scoped to this document. Game dimensions, state and controls
 * remain owned by the shared engine, including its wide/short/tall layouts.
 */
html[data-theme="vice"] {
  --vice-pink: #ff67b3;
  --vice-cyan: #76e7e0;
  --vice-purple: #bc8bf4;
  --vice-peach: #ffc294;
  --night: #170f27;
  --night-card: #241930;
  --night-plate: #30203c;
  --night-line: #644672;
  --night-text: #fff0ec;
  --night-muted: #baa0c5;
  --orange: #ff8fc3;
  --orange-deep: #b2407e;
  --ink: #1a0a25;
  background: #150c25;
}
html[data-theme="vice"] body {
  background: #150c25;
}

/* Full-screen pixel city, with purely decorative light layers behind the game. */
html[data-theme="vice"] .vice-world,
html[data-theme="vice"] .vice-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
html[data-theme="vice"] .vice-world {
  background:
    linear-gradient(#160d28ad, #1b0e2d9c 48%, #10091bdb),
    url("/themes/vice/assets/vice-bay.png") center / cover;
  image-rendering: pixelated;
}
html[data-theme="vice"] .vice-light {
  position: absolute;
  width: 60vw;
  height: 75vh;
  opacity: 0.45;
}
html[data-theme="vice"] .vice-light-pink {
  top: 7%;
  left: -22%;
  background: radial-gradient(ellipse, #e9418f35, transparent 67%);
}
html[data-theme="vice"] .vice-light-cyan {
  bottom: -20%;
  right: -20%;
  background: radial-gradient(ellipse, #53cddc29, transparent 67%);
}
html[data-theme="vice"] .vice-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(transparent 0 3px, #13092324 3px 4px);
  opacity: 0.35;
}
html[data-theme="vice"] .vice-spark {
  position: absolute;
  width: var(--spark-size);
  height: var(--spark-size);
  background: var(--spark-color);
  opacity: 0.35;
}
html[data-theme="vice"] .vice-traffic {
  position: absolute;
  left: -260px;
  bottom: 8%;
  width: 230px;
  height: 120px;
  opacity: 0.42;
}
html[data-theme="vice"] .vice-traffic-car {
  --sprite-size: 230px;
  position: absolute;
  width: 230px;
  height: 230px;
  top: -68px;
  image-rendering: pixelated;
}
html[data-theme="vice"] .vice-traffic::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 0;
  bottom: 6px;
  height: 8px;
  background: linear-gradient(90deg, #ff56b900, #ff56b944, #69e7dc19);
  filter: blur(3px);
}

/* Shared lobby nodes retain their real content and sprite-sheet animations. */
html[data-theme="vice"] #lobby {
  --night: #180f27;
  --night-card: #261a35;
  --night-plate: #2c1d3b;
  --night-line: #62446f;
  --night-text: #fff0ed;
  --night-muted: #c09aba;
  --ink: #1c0d2a;
  background: transparent;
}
html[data-theme="vice"] #lobby > .room-backdrop {
  display: none;
}
html[data-theme="vice"] #lobby > .room-shade {
  background:
    radial-gradient(70% 64% at 50% 50%, transparent, #160c2859),
    linear-gradient(#140b29b3, transparent 22% 75%, #140b29b3);
}
html[data-theme="vice"] #lobby .mode {
  filter: drop-shadow(0 6px 0 #0805129c);
}
html[data-theme="vice"] #lobby .mode-card {
  background: linear-gradient(135deg, #63416f, #2d1d40 25%, #23172e 70%, #49305c);
  box-shadow:
    inset 0 0 0 3px #765281,
    inset 0 0 0 6px #190d29;
}
html[data-theme="vice"] #lobby .mode-name {
  color: #fff1ed;
  background: linear-gradient(#33203f, #24182f);
  box-shadow:
    inset 0 -5px var(--glow),
    inset 0 0 0 2px #6d4777;
  text-shadow:
    2px 2px #160a21,
    -1px -1px #160a21;
}
html[data-theme="vice"] #lobby .mode:hover,
html[data-theme="vice"] #lobby .mode:focus-visible {
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--glow) 40%, transparent))
    drop-shadow(0 12px 0 #0805129c);
}
html[data-theme="vice"] #lobby .mode:hover .mode-card,
html[data-theme="vice"] #lobby .mode:focus-visible .mode-card {
  box-shadow:
    inset 0 0 0 4px var(--glow),
    inset 0 0 0 6px #190d29;
}
html[data-theme="vice"] #lobby .mode-heroes {
  --glow: #76e7e0;
  --glow-deep: #308f9b;
}
html[data-theme="vice"] #lobby .mode-shop {
  --glow: #bd8bf4;
  --glow-deep: #7d469e;
}
html[data-theme="vice"] #lobby .mode-dungeon {
  --glow: #ff69b4;
  --glow-deep: #b72f78;
}
html[data-theme="vice"] #lobby .mode-rankings {
  --glow: #ffc294;
  --glow-deep: #ac6d52;
}
html[data-theme="vice"] #lobby .mode-stake {
  --glow: #b297ff;
  --glow-deep: #7652bc;
}
html[data-theme="vice"] #lobby .mode-dungeon .mode-card {
  box-shadow:
    inset 0 0 0 4px #ff69b4,
    inset 0 0 0 7px #35132f;
}
html[data-theme="vice"] #lobby .mode-dungeon .mode-name {
  color: #ffaad1;
}

/* Familiar characters now stand under neon lights; their animation isn't faked. */
html[data-theme="vice"] #lobby .art-heroes {
  background:
    radial-gradient(70% 60% at 50% 55%, #4e939b43, transparent 80%),
    linear-gradient(125deg, #231532, #111928 55%, #3a1d3f);
}
html[data-theme="vice"] #lobby .art-shop {
  background: radial-gradient(70% 60% at 50% 48%, #b270c64d, #1a102b 83%);
}
html[data-theme="vice"] #lobby .art-dungeon {
  background:
    linear-gradient(#1a0c2ac9, #38132c9c 65%, #160d22e6),
    url("/themes/vice/assets/vice-bay.png") 63% 70% / cover;
}
html[data-theme="vice"] #lobby .raid-feature-art {
  background:
    radial-gradient(ellipse at 50% 50%, #170c2959, #170c29db),
    url("/themes/vice/assets/vice-bay.png") 50% 53% / cover;
}
html[data-theme="vice"] #lobby .raid-feature-canvas {
  filter: drop-shadow(0 0 10px #f863aa24);
}
html[data-theme="vice"] #lobby .mode-ignaroth {
  --glow: #ff6fab;
  --glow-deep: #ad3268;
  --boss-ink: #ff99bf;
}
html[data-theme="vice"] #lobby .raid-feature-name {
  color: #ff9cc6;
}
html[data-theme="vice"] #lobby .raid-feature-sub {
  color: #f6e5ed;
}
html[data-theme="vice"] #lobby .raid-status {
  background: #22122fed;
  box-shadow: inset 0 0 0 2px #be5e93;
  color: #ffdfed;
}
html[data-theme="vice"] #lobby .mode-daily-deals {
  --glow: #ff88ce;
  --glow-deep: #a33e89;
}
html[data-theme="vice"] #lobby .mode-starter-heroes {
  --glow: #79dfdc;
  --glow-deep: #337d8a;
  --tint: 121, 223, 220;
  --name: #b7fff1;
}
html[data-theme="vice"] #lobby .mode-starter-gear {
  --glow: #ffbd9b;
  --glow-deep: #a76767;
  --tint: 255, 189, 155;
  --name: #ffdfc8;
}
html[data-theme="vice"] #lobby .dd-card-art {
  background: radial-gradient(70% 55% at 50% 48%, #914e9f4d, #1a1028 83%);
}
html[data-theme="vice"] #lobby .st-art.heroes {
  background: radial-gradient(70% 55% at 50% 48%, #397e8a57, #181028 83%);
}
html[data-theme="vice"] #lobby .st-art.gear {
  background: radial-gradient(70% 55% at 50% 48%, #9f5e6b4d, #1a1028 83%);
}
html[data-theme="vice"] #lobby .dd-card-band {
  background: linear-gradient(#ffc7d0 0 5px, #ff83bd 5px 83%, #b73a78 83%);
}

/* Every HUD button, value and conditional shortcut remains the original node. */
html[data-theme="vice"] .topbar {
  --night-line: #60436f;
  --night-plate: #291b39;
  --night-text: #ffedf3;
  --night-muted: #bca4cd;
  --orange: #ff92c4;
  --ink: #1b0b28;
}
html[data-theme="vice"] .app[data-screen="lobby"] .topbar {
  background: linear-gradient(#180e2dec, #180e2d66);
  box-shadow: inset 0 -1px #ae56832e;
}
html[data-theme="vice"] .player-name {
  color: #ff9ac9;
}
html[data-theme="vice"] .topbar :is(.mhdg-chip, .top-btn, .link-btn) {
  background: #26172fdf;
  box-shadow:
    inset 0 0 0 2px #684775,
    inset 0 4px #8c628c1a;
}
html[data-theme="vice"] .topbar .mhdg-value {
  color: #ffe0b9;
}
html[data-theme="vice"] .topbar .invite-btn {
  box-shadow:
    inset 0 -3px #60d6d7,
    inset 0 0 0 2px #684775;
}
html[data-theme="vice"] .topbar .asb {
  --pvp: #7ce6d8;
  --pvp-light: #c7ece4;
  background: linear-gradient(110deg, #1a3441f5, #20182bf5 60%, #38203bf5);
  box-shadow:
    inset 0 0 0 2px #70d4ce,
    0 0 16px #57dbd41c;
}
html[data-theme="vice"] .topbar .asb-amount b {
  color: #ffcf99;
}
html[data-theme="vice"] #lobby .shortcut-plate {
  background: #24162fef;
  box-shadow:
    inset 0 0 0 2px #6a4878,
    inset 0 4px #c48abb12,
    0 5px #10091c99;
}
html[data-theme="vice"] #lobby .shortcut-locked .shortcut-plate {
  box-shadow:
    inset 0 0 0 2px #b68ce8,
    0 5px #10091c99;
}
html[data-theme="vice"] #lobby .shortcut:hover .shortcut-plate,
html[data-theme="vice"] #lobby .shortcut:focus-visible .shortcut-plate {
  box-shadow:
    inset 0 0 0 2px #ff90c8,
    inset 0 0 15px #ff70b328;
}
html[data-theme="vice"] #lobby .lobby-dots .on {
  background: #ff92c5;
}

/* The small wordmark sits beside the existing journey dock, never over controls. */
html[data-theme="vice"] .vice-brand-plate {
  position: fixed;
  z-index: 7;
  left: 22px;
  bottom: 49px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  color: #fff3e3;
}
html[data-theme="vice"] .vice-brand-plate[hidden] {
  display: none;
}
html[data-theme="vice"] .vice-wordmark {
  display: flex;
  flex-direction: column;
  font: 38px/0.63 var(--font-display);
  letter-spacing: 0.5px;
  transform: skew(-3deg);
  text-shadow:
    -2px -2px #170b23,
    2px -2px #170b23,
    -2px 2px #170b23,
    2px 2px #170b23,
    -4px 3px #58dad4,
    4px 5px #ee4d9f;
}
html[data-theme="vice"] .vice-wordmark-coin {
  color: #ff94c5;
}
html[data-theme="vice"] .vice-build-note {
  color: #e3b0ce;
  font: 18px/1 var(--font-display);
  letter-spacing: 0.4px;
  padding: 8px 0;
  text-shadow: 1px 2px #160921;
}
html[data-theme="vice"] .vice-build-note:hover {
  color: #8effee;
}
html[data-theme="vice"] #local-game-dock {
  color: #dcaacb;
  background: #20132ef0;
  border-color: #6f4372;
}
html[data-theme="vice"] #local-game-dock button {
  background: #ff90c1;
  color: #23112d;
  border-color: #854368;
  box-shadow: 0 3px #45233d;
}

/* Authentication stays Phantom's real flow, with only its presentation changed. */
html[data-theme="vice"] .loading {
  background:
    linear-gradient(#160b29b8, #170e2dd9),
    url("/themes/vice/assets/vice-bay.png") center / cover;
}
html[data-theme="vice"] .loading-logo {
  color: #fff1df;
  text-align: center;
  font-size: 110px;
  text-shadow:
    -3px -3px #1d0b2d,
    3px -3px #1d0b2d,
    -3px 3px #1d0b2d,
    3px 3px #1d0b2d,
    -5px 4px #69d4d0,
    5px 7px #dc4c98;
}
html[data-theme="vice"] .loading-logo b {
  color: #ff94c5;
}
html[data-theme="vice"] .loading-fill {
  background: linear-gradient(#ffc8e6 0 3px, #ff79ba 3px 80%, #a73d80 80%);
}
html[data-theme="vice"] .loading .loading-note {
  color: #e2c4dc;
}
html[data-theme="vice"] .vice-loading-cast {
  --sprite-size: 300px;
  display: block;
  position: relative;
  width: 300px;
  height: 300px;
}

/* Cosmetic animation is paused off-screen, behind menus and for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html[data-theme="vice"] .vice-light {
    animation: vice-neon-breathe 7s steps(12) infinite alternate;
  }
  html[data-theme="vice"] .vice-light-cyan {
    animation-delay: -3s;
  }
  html[data-theme="vice"] .vice-spark {
    animation: vice-drift var(--spark-duration) linear var(--spark-delay) infinite;
  }
  html[data-theme="vice"] .vice-traffic {
    animation: vice-drive 24s linear infinite;
  }
  html[data-theme="vice"] #lobby .art-ground {
    box-shadow:
      0 2px #ff79be28,
      0 5px #62ded91a;
  }
  html[data-theme="vice"] #lobby .mode-dungeon .mode-card {
    animation: vice-frame-breathe 4s steps(12) infinite alternate;
  }
  html[data-theme="vice"][data-vice-motion="paused"] :is(.vice-atmosphere *, #lobby .mode-card) {
    animation-play-state: paused;
  }
}
@keyframes vice-neon-breathe {
  to {
    opacity: 0.85;
    transform: translate3d(0, -16px, 0);
  }
}
@keyframes vice-drift {
  0% {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  15%,
  70% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
    transform: translate3d(24px, -110px, 0);
  }
}
@keyframes vice-drive {
  0%,
  12% {
    transform: translateX(0);
    opacity: 0;
  }
  16%,
  50% {
    opacity: 0.42;
  }
  58%,
  100% {
    transform: translateX(calc(100vw + 500px));
    opacity: 0;
  }
}
@keyframes vice-frame-breathe {
  to {
    box-shadow:
      inset 0 0 0 4px #ff9ccc,
      inset 0 0 0 7px #491a3c;
  }
}

/* Existing virtual game layouts remain intact; only the external logo adapts. */
@media (max-width: 760px) {
  html[data-theme="vice"] .vice-world {
    background-position: 65% center;
  }
  html[data-theme="vice"] .vice-traffic {
    display: none;
  }
  html[data-theme="vice"] .vice-brand-plate {
    left: 15px;
    bottom: 47px;
    gap: 12px;
  }
  html[data-theme="vice"] .vice-wordmark {
    font-size: 27px;
  }
  html[data-theme="vice"] .vice-build-note {
    font-size: 14px;
  }
  html[data-theme="vice"] body:has(.app[data-format="tall"]) .vice-brand-plate {
    left: auto;
    right: 10px;
    top: auto;
    bottom: 4px;
    align-items: flex-start;
  }
  html[data-theme="vice"] body:has(.app[data-format="tall"]) .vice-wordmark {
    display: none;
  }
  html[data-theme="vice"] body:has(.app[data-format="tall"]) .vice-build-note {
    background: #23142ce6;
    border: 1px solid #854d7c;
    padding: 5px 7px;
    font-size: 13px;
  }
  html[data-theme="vice"] #local-game-dock {
    font-size: 8px;
    padding: 3px 5px;
    gap: 6px;
  }
  html[data-theme="vice"] #local-game-dock button {
    font-size: 13px;
    padding: 4px 7px;
  }
  /* Leave the last shortcut row clear. Jornada uses the free space in the HUD;
   * the local-credit status stays in a slim, non-interactive bottom line. */
  html[data-theme="vice"][data-vice-view="lobby"]
    body:has(.app[data-format="tall"])
    #local-game-dock {
    background: transparent;
    border: 0;
    padding: 0;
    pointer-events: none;
    font-size: 7px;
  }
  html[data-theme="vice"][data-vice-view="lobby"]
    body:has(.app[data-format="tall"])
    #local-game-dock
    button {
    position: fixed;
    left: 16.4vw;
    top: clamp(8px, 3vw, 14px);
    padding: 6px 8px;
    font-size: clamp(11px, 3.3vw, 14px);
    pointer-events: auto;
  }
  html[data-theme="vice"] .app[data-format="tall"] .screen-lobby > .shortcuts {
    bottom: calc(28px + env(safe-area-inset-bottom));
  }
}
@media (max-height: 560px) and (min-width: 761px) {
  html[data-theme="vice"] .vice-wordmark {
    font-size: 26px;
  }
  html[data-theme="vice"] .vice-brand-plate {
    bottom: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="vice"] .vice-atmosphere * {
    animation: none !important;
  }
  html[data-theme="vice"] .vice-traffic {
    display: none;
  }
}

/* Shared pages and dialogs use the approved palette while retaining their layout. */
html[data-theme="vice"] :is(.panel, .page-head, .page-nav, .page-titlebar) {
  background: linear-gradient(140deg, #2e1b3df7, #1c152cf7);
  --accent: #bd83de;
}
html[data-theme="vice"] .modal-backdrop {
  background: #11091dcc;
}
html[data-theme="vice"] :is(.panel, .map-frame) {
  box-shadow:
    inset 0 0 0 3px #795184,
    inset 0 0 0 6px #1b0d28;
}
html[data-theme="vice"] .panel-title {
  color: #ffd5ea;
}
html[data-theme="vice"] .cta-main {
  color: #27112d;
  background: #ff8fc3;
  box-shadow:
    inset 0 -7px #b2407e,
    inset 0 3px #ffd0e9;
}
html[data-theme="vice"] .cta-alt {
  color: #f6e8f6;
  background: #33213f;
  box-shadow:
    inset 0 -6px #1c1029,
    inset 0 0 0 2px #775383;
}
html[data-theme="vice"] :is(.close-btn, .hero-tools, .roster-tools) {
  background-color: #30203e;
}
html[data-theme="vice"] .cta:disabled {
  color: #9a88a8;
  background: #392c46;
  box-shadow: inset 0 -6px #20172c;
}
html[data-theme="vice"] :is(input, select, textarea) {
  accent-color: #ff8fc3;
  caret-color: #75e6de;
}
html[data-theme="vice"] :is(#local-journey, #local-purchase) {
  background: #24182f;
  color: #f9e8f4;
  border-color: #ae6c9c;
}
html[data-theme="vice"] :is(#local-journey, #local-purchase) :is(h2, h3) {
  color: #ffa6d0;
}
html[data-theme="vice"] :is(#local-journey, #local-purchase) button {
  background: #ff8fc3;
  border-color: #a5477c;
  color: #24112e;
  box-shadow: 0 3px #562440;
}
html[data-theme="vice"] #local-journey article {
  background: #30213d;
  border-color: #70527d;
}
html[data-theme="vice"] .pwa-controls {
  background: #241a31;
  border-color: #775181;
}
html[data-theme="vice"] .pwa-action {
  background: #ff8fc3;
  color: #24112e;
}
